From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx8iS-0005yq-Ah for qemu-devel@nongnu.org; Fri, 13 Nov 2015 02:24:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx8iN-0006ro-DZ for qemu-devel@nongnu.org; Fri, 13 Nov 2015 02:24:12 -0500 Received: from mga01.intel.com ([192.55.52.88]:49145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx8iN-0006r4-8S for qemu-devel@nongnu.org; Fri, 13 Nov 2015 02:24:07 -0500 From: Yuanhan Liu Date: Fri, 13 Nov 2015 15:24:09 +0800 Message-Id: <1447399450-29489-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [Qemu-devel] [PATCH 1/2] vhost: let SET_VRING_ENABLE message depends on protocol feature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yuanhan Liu , mst@redhat.com 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 --- 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