|
|
22c213 |
From c0cf6d8a1d3b9bf3928f37fcfd5aa8ae6f1338ca Mon Sep 17 00:00:00 2001
|
|
|
22c213 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
22c213 |
Date: Mon, 27 Jan 2020 19:00:36 +0100
|
|
|
22c213 |
Subject: [PATCH 005/116] virtio-fs: fix MSI-X nvectors calculation
|
|
|
22c213 |
MIME-Version: 1.0
|
|
|
22c213 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c213 |
Content-Transfer-Encoding: 8bit
|
|
|
22c213 |
|
|
|
22c213 |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
22c213 |
Message-id: <20200127190227.40942-2-dgilbert@redhat.com>
|
|
|
22c213 |
Patchwork-id: 93455
|
|
|
22c213 |
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 001/112] virtio-fs: fix MSI-X nvectors calculation
|
|
|
22c213 |
Bugzilla: 1694164
|
|
|
22c213 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
22c213 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
22c213 |
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
|
|
|
22c213 |
|
|
|
22c213 |
From: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
22c213 |
|
|
|
22c213 |
The following MSI-X vectors are required:
|
|
|
22c213 |
* VIRTIO Configuration Change
|
|
|
22c213 |
* hiprio virtqueue
|
|
|
22c213 |
* requests virtqueues
|
|
|
22c213 |
|
|
|
22c213 |
Fix the calculation to reserve enough MSI-X vectors. Otherwise guest
|
|
|
22c213 |
drivers fall back to a sub-optional configuration where all virtqueues
|
|
|
22c213 |
share a single vector.
|
|
|
22c213 |
|
|
|
22c213 |
This change does not break live migration compatibility since
|
|
|
22c213 |
vhost-user-fs-pci devices are not migratable yet.
|
|
|
22c213 |
|
|
|
22c213 |
Reported-by: Vivek Goyal <vgoyal@redhat.com>
|
|
|
22c213 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
22c213 |
Message-Id: <20191209110759.35227-1-stefanha@redhat.com>
|
|
|
22c213 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
22c213 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
22c213 |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
22c213 |
(cherry picked from commit 366844f3d1329c6423dd752891a28ccb3ee8fddd)
|
|
|
22c213 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
22c213 |
---
|
|
|
22c213 |
hw/virtio/vhost-user-fs-pci.c | 3 ++-
|
|
|
22c213 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
22c213 |
|
|
|
22c213 |
diff --git a/hw/virtio/vhost-user-fs-pci.c b/hw/virtio/vhost-user-fs-pci.c
|
|
|
22c213 |
index 933a3f2..e3a649d 100644
|
|
|
22c213 |
--- a/hw/virtio/vhost-user-fs-pci.c
|
|
|
22c213 |
+++ b/hw/virtio/vhost-user-fs-pci.c
|
|
|
22c213 |
@@ -40,7 +40,8 @@ static void vhost_user_fs_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
|
|
22c213 |
DeviceState *vdev = DEVICE(&dev->vdev);
|
|
|
22c213 |
|
|
|
22c213 |
if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
|
|
|
22c213 |
- vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 1;
|
|
|
22c213 |
+ /* Also reserve config change and hiprio queue vectors */
|
|
|
22c213 |
+ vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 2;
|
|
|
22c213 |
}
|
|
|
22c213 |
|
|
|
22c213 |
qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
|
|
|
22c213 |
--
|
|
|
22c213 |
1.8.3.1
|
|
|
22c213 |
|