From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzPNb-0005Do-H8 for qemu-devel@nongnu.org; Thu, 19 Nov 2015 08:36:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzPNa-0005ES-MP for qemu-devel@nongnu.org; Thu, 19 Nov 2015 08:36:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzPNa-0005Do-Ht for qemu-devel@nongnu.org; Thu, 19 Nov 2015 08:36:02 -0500 Date: Thu, 19 Nov 2015 15:35:59 +0200 From: "Michael S. Tsirkin" Message-ID: <1447939696-28930-2-git-send-email-mst@redhat.com> References: <1447939696-28930-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447939696-28930-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 01/15] 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: Peter Maydell , Yuanhan Liu From: Yuanhan Liu 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 c443602..3404b81 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -338,7 +338,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; } -- MST