This is based-on [1], which adds MSI-X support to virtio-balloon-pci, but can be applied independently.
Turns out it is fairly easy to get virtio-mem-pci running on s390x. We only have to add MSI-X support to virtio-mem-pci, and wire-up the (un)plugging in the machine. Tried some simple stuff (hotplug/hotunplug/resize/reboot), and all seems to be working as expected. The kernel in the VM needs both, CONFIG_VIRTIO_PCI and CONFIG_VIRTIO_MEM for it to work. [1] https://lkml.kernel.org/r/20250115161425.246348-1-ar...@linux.ibm.com Cc: Eduardo Habkost <edua...@habkost.net> Cc: Marcel Apfelbaum <marcel.apfelb...@gmail.com> Cc: Richard Henderson <richard.hender...@linaro.org> Cc: David Hildenbrand <da...@redhat.com> Cc: Ilya Leoshkevich <i...@linux.ibm.com> Cc: Halil Pasic <pa...@linux.ibm.com> Cc: Christian Borntraeger <borntrae...@linux.ibm.com> Cc: Eric Farman <far...@linux.ibm.com> Cc: Thomas Huth <th...@redhat.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Cornelia Huck <coh...@redhat.com> Cc: Boris Fiuczynski <fiu...@linux.ibm.com> Cc: Michal Privoznik <mpriv...@redhat.com> David Hildenbrand (2): virtio-mem-pci: Allow setting nvectors, so we can use MSI-X s390x/s390-virtio-ccw: support plugging PCI-based virtio memory devices hw/core/machine.c | 3 +++ hw/s390x/s390-virtio-ccw.c | 20 ++++++++++++++------ hw/virtio/virtio-mem-pci.c | 12 ++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) -- 2.48.1