Commit 50a7949b authored by jiangdongxu's avatar jiangdongxu
Browse files

vhost: add VHOST feature VHOST_BACKEND_F_BYTEMAPLOG

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



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

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 5b45c921
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -807,7 +807,8 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
			return -EFAULT;
		if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
				 BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
				 BIT_ULL(VHOST_BACKEND_F_RESUME)))
				 BIT_ULL(VHOST_BACKEND_F_RESUME) |
				 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
@@ -182,4 +182,7 @@ enum {
/* Device can be resumed */
#define VHOST_BACKEND_F_RESUME  0x5

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

#endif