qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/2] vhost: let SET_VRING_ENABLE message depends on


From: Yuanhan Liu
Subject: [Qemu-devel] [PATCH 1/2] vhost: let SET_VRING_ENABLE message depends on protocol feature
Date: Fri, 13 Nov 2015 15:24:09 +0800

But not depend on PROTOCOL_F_MQ feature bit. So that we could use
SET_VRING_ENABLE to sign the backend on stop, even if MQ is disabled.

That's reasonable, since we will have one queue pair at least.

Signed-off-by: Yuanhan Liu <address@hidden>
---
 hw/virtio/vhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 4766f98..a9c8335 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -331,7 +331,7 @@ static int vhost_user_set_vring_enable(struct vhost_dev 
*dev, int enable)
         .num   = enable,
     };
 
-    if (!(dev->protocol_features & (1ULL << VHOST_USER_PROTOCOL_F_MQ))) {
+    if (!virtio_has_feature(dev->features, VHOST_USER_F_PROTOCOL_FEATURES)) {
         return -1;
     }
 
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]