On 27.07.2025 14:48, Michael Tokarev wrote:
On 14.07.2025 11:04, Eric Auger wrote:
gpex build_host_bridge_osc() and x86 originated
build_pci_host_bridge_osc_method() are mostly identical.
In GPEX, SUPP is set to CDW2 but is not further used. CTRL is
same as Local0.
So let gpex code reuse build_pci_host_bridge_osc_method() and
remove build_host_bridge_osc().
Also add an imply ACPI_PCI clause along with
PCI_EXPRESS_GENERIC_BRIDGE to compile hw/acpi/pci.c when its
dependency is resolved (ie. CONFIG_ACPI_PCI). This is requested
to link qemu-system-mips64el.
This patch somehow broke microvm-only build which is used by debian.
configure options used (trimmed a bit):
../configure \ --without-default-features \ --target-list=x86_64-
softmmu \ --enable-kvm --disable-tcg \ --enable-pixman \ --enable-
vnc \ --audio-drv-list="" \ --without-default-devices \ --with-
devices-x86_64=microvm \ --enable-vhost-user
configs/devices/x86_64-softmmu/microvm.mak: ---- cut ---- # see
configs/devices/i386-softmmu/default.mak # for additional devices
which can be disabled # CONFIG_PCI_DEVICES=n
CONFIG_MICROVM=y
CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_SERIAL=y CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_INPUT_HOST=y CONFIG_VHOST_USER_INPUT=y
CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_SCSI=y CONFIG_VIRTIO_RNG=y
CONFIG_VIRTIO_CRYPTO=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_GPU=y
CONFIG_VHOST_USER_GPU=y ---- cut ----
The result: FAILED: qemu-system-x86_64 cc -m64 @qemu-system-
x86_64.rsp /usr/bin/ld: libsystem.a.p/hw_pci-host_gpex-acpi.c.o: in
function `acpi_dsdt_add_host_bridge_methods': hw/pci-host/gpex-
acpi.c:83:(.text+0x274): undefined reference to
`build_pci_host_bridge_osc_method' collect2: error: ld returned 1
exit status
In hw/i386/Kconfig, MICROVM selects ACPI_HW_REDUCED (not ACPI or
ACPI_PCI), *and* PCI_EXPRESS_GENERIC_BRIDGE. But in hw/pci/meson.build,
pci.c (where the function in question is defined) is built when
ACPI_PCI is enabled. Something's not right here.
Addig kraxel for 24db877ab6e6 "microvm: add pcie support".
Thanks
/mjt