Commit b1b48dd8 authored by jiangdongxu's avatar jiangdongxu Committed by Jiang Dongxu
Browse files

vhost: add VHOST feature VHOST_BACKEND_F_BYTEMAPLOG

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8TP8X



----------------------------------------------------------------------

Introduce new feature bit VHOST_BACKEND_F_BYTEMAPLOG for negotiating the
type of dirty pages.

As some hardware only support bytemap for logging, introduce a new
feature bit. When vhost device starte, negotiating dirty page type used
for logging.

Signed-off-by: default avatarjiangdongxu <jiangdongxu1@huawei.com>
parent 269a8fd6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -810,7 +810,8 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
		if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
				 BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
				 BIT_ULL(VHOST_BACKEND_F_RESUME) |
				 BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK)))
				 BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK) |
				 BIT_ULL(VHOST_BACKEND_F_BYTEMAPLOG)))
			return -EOPNOTSUPP;
		if ((features & BIT_ULL(VHOST_BACKEND_F_SUSPEND)) &&
		     !vhost_vdpa_can_suspend(v))
+3 −0
Original line number Diff line number Diff line
@@ -202,4 +202,7 @@ enum {
 */
#define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK  0x6

/* Device can use bytemap to deal log */
#define VHOST_BACKEND_F_BYTEMAPLOG  0x3f

#endif