qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] virtio-balloon-pci: Allow setting nvectors, so we can use MS


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] virtio-balloon-pci: Allow setting nvectors, so we can use MSI-X
Date: Wed, 15 Jan 2025 10:06:26 +0100
User-agent: Mozilla Thunderbird

Hi Reza,

On 16/12/24 17:31, Reza Arbab wrote:
Most virtio-pci devices allow MSI-X. Add it to virtio-balloon-pci, but
only enable it in new machine types, so we don't break migration of
existing machine types between different qemu versions.

This copies what was done for virtio-rng-pci in:
9ea02e8f1306 ("virtio-rng-pci: Allow setting nvectors, so we can use MSI-X")
bad9c5a5166f ("virtio-rng-pci: fix migration compat for vectors")
62bdb8871512 ("virtio-rng-pci: fix transitional migration compat for vectors")

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
  hw/core/machine.c              |  6 +++++-
  hw/virtio/virtio-balloon-pci.c | 13 +++++++++++++
  2 files changed, 18 insertions(+), 1 deletion(-)


diff --git a/hw/virtio/virtio-balloon-pci.c b/hw/virtio/virtio-balloon-pci.c
index ce2645ba7187..1c2b071eff0c 100644
--- a/hw/virtio/virtio-balloon-pci.c
+++ b/hw/virtio/virtio-balloon-pci.c
@@ -35,11 +35,23 @@ struct VirtIOBalloonPCI {
      VirtIOBalloon vdev;
  };
+static Property virtio_balloon_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),

You shouldn't use that anymore since commit 5fcabe628b8
("include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST").

Also, this array can be declared const.

+};



reply via email to

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