]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/virtio: Also include md stubs in case CONFIG_VIRTIO_PCI is not set
authorThomas Huth <thuth@redhat.com>
Thu, 13 Mar 2025 06:35:22 +0000 (07:35 +0100)
committerThomas Huth <thuth@redhat.com>
Wed, 19 Mar 2025 06:41:32 +0000 (07:41 +0100)
commitc1a6bff276ca52ffde472532d92bb5bb122dab3f
treec15070e21484b8a610dba9bc85dd4846a6ddd001
parent1dae461a913f9da88df05de6e2020d3134356f2e
hw/virtio: Also include md stubs in case CONFIG_VIRTIO_PCI is not set

For the s390x target, it's possible to build the QEMU binary without
CONFIG_VIRTIO_PCI and only have the virtio-mem device via the ccw
transport. In that case, QEMU currently fails to link correctly:

 /usr/bin/ld: libqemu-s390x-softmmu.a.p/hw_s390x_s390-virtio-ccw.c.o: in function `s390_machine_device_pre_plug':
 ../hw/s390x/s390-virtio-ccw.c:579:(.text+0x1e96): undefined reference to `virtio_md_pci_pre_plug'
 /usr/bin/ld: libqemu-s390x-softmmu.a.p/hw_s390x_s390-virtio-ccw.c.o: in function `s390_machine_device_plug':
 ../hw/s390x/s390-virtio-ccw.c:608:(.text+0x21a4): undefined reference to `virtio_md_pci_plug'
 /usr/bin/ld: libqemu-s390x-softmmu.a.p/hw_s390x_s390-virtio-ccw.c.o: in function `s390_machine_device_unplug_request':
 ../hw/s390x/s390-virtio-ccw.c:622:(.text+0x2334): undefined reference to `virtio_md_pci_unplug_request'
 /usr/bin/ld: libqemu-s390x-softmmu.a.p/hw_s390x_s390-virtio-ccw.c.o: in function `s390_machine_device_unplug':
 ../hw/s390x/s390-virtio-ccw.c:633:(.text+0x2436): undefined reference to `virtio_md_pci_unplug'
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

We also need to include the stubs when CONFIG_VIRTIO_PCI is missing.

Fixes: aa910c20ec5 ("s390x: virtio-mem support")
Message-ID: <20250313063522.1348288-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/virtio/meson.build