From 703857348724319735d9be7b5b996e6445c6e6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 16 Nov 2019 15:20:16 +0400 Subject: [PATCH 1/2] vhost-user-fs: remove "vhostfd" property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The property doesn't make much sense for a vhost-user device. Signed-off-by: Marc-André Lureau Message-Id: <20191116112016.14872-1-marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user-fs.c | 1 - include/hw/virtio/vhost-user-fs.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index f0df7f4746..ca0b7fc9de 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -263,7 +263,6 @@ static Property vuf_properties[] = { DEFINE_PROP_UINT16("num-request-queues", VHostUserFS, conf.num_request_queues, 1), DEFINE_PROP_UINT16("queue-size", VHostUserFS, conf.queue_size, 128), - DEFINE_PROP_STRING("vhostfd", VHostUserFS, conf.vhostfd), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/virtio/vhost-user-fs.h b/include/hw/virtio/vhost-user-fs.h index 539885b458..9ff1bdb7cf 100644 --- a/include/hw/virtio/vhost-user-fs.h +++ b/include/hw/virtio/vhost-user-fs.h @@ -28,7 +28,6 @@ typedef struct { char *tag; uint16_t num_request_queues; uint16_t queue_size; - char *vhostfd; } VHostUserFSConf; typedef struct { From 366844f3d1329c6423dd752891a28ccb3ee8fddd Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 9 Dec 2019 11:07:59 +0000 Subject: [PATCH 2/2] virtio-fs: fix MSI-X nvectors calculation The following MSI-X vectors are required: * VIRTIO Configuration Change * hiprio virtqueue * requests virtqueues Fix the calculation to reserve enough MSI-X vectors. Otherwise guest drivers fall back to a sub-optional configuration where all virtqueues share a single vector. This change does not break live migration compatibility since vhost-user-fs-pci devices are not migratable yet. Reported-by: Vivek Goyal Signed-off-by: Stefan Hajnoczi Message-Id: <20191209110759.35227-1-stefanha@redhat.com> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user-fs-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user-fs-pci.c b/hw/virtio/vhost-user-fs-pci.c index 933a3f265b..e3a649d4a6 100644 --- a/hw/virtio/vhost-user-fs-pci.c +++ b/hw/virtio/vhost-user-fs-pci.c @@ -40,7 +40,8 @@ static void vhost_user_fs_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) DeviceState *vdev = DEVICE(&dev->vdev); if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) { - vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 1; + /* Also reserve config change and hiprio queue vectors */ + vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 2; } qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));