You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/hw/i386
Eric Auger eb013cd6a1 hw/i386/microvm: Explicitly select ACPI_PCI
With a microvm-only build based on a custom device config,
we get a link failure due to undefined reference to
build_pci_host_bridge_osc_method() which is defined in hw/acpi/pci.c and
whose compilation depends on CONFIG_ACPI_PCI. Although CONFIG_ACPI
and CONFIG_PCI are set with such configuration, implied CONFIG_ACPI_PCI
in config PCI_EXPRESS_GENERIC_BRIDGE is not selected as expected.

It Looks like CONFIG_ACPI_PCI must be enforced and this patch selects
CONFIG_ACPI_PCI in MICROVM config directly as done for PC config.

Reproducer:

../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

with configs/devices/x86_64-softmmu/microvm.mak:
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

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

Fixes: af151d50ea "hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method"
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-ID: <20250804152008.247673-1-eric.auger@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 days ago
..
kvm * target/i386/kvm: Intel TDX support 2 months ago
xen qom: Make InterfaceInfo[] uses const 4 months ago
Kconfig hw/i386/microvm: Explicitly select ACPI_PCI 6 days ago
acpi-build.c hw/i386/acpi-build: Move aml_pci_edsm to a generic place 4 weeks ago
acpi-build.h hw/acpi: Rename and move build_x86_acpi_pci_hotplug to pcihp 4 weeks ago
acpi-common.c include/system: Move exec/memory.h to system/memory.h 4 months ago
acpi-common.h hw/i386/acpi: Declare pc_madt_cpu_entry() in 'acpi-common.h' 1 year ago
acpi-microvm.c include/system: Move exec/memory.h to system/memory.h 4 months ago
acpi-microvm.h microvm/acpi: add minimal acpi support 5 years ago
amd_iommu-stub.c amd_iommu: report x2APIC support to the operating system 2 years ago
amd_iommu.c hw/i386/amd_iommu: Fix event log generation 1 week ago
amd_iommu.h hw/i386/amd_iommu: Fix event log generation 1 week ago
e820_memory_layout.c hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 1 year ago
e820_memory_layout.h hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 1 year ago
fw_cfg.c rust: Kconfig: Factor out whether HPET is Rust or C 5 months ago
fw_cfg.h hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 1 year ago
intel_iommu.c intel_iommu: Allow both Status Write and Interrupt Flag in QI wait 1 week ago
intel_iommu_internal.h intel_iommu: Declare supported PASID size 4 weeks ago
meson.build i386/tdx: Setup the TD HOB list 3 months ago
microvm-dt.c include: Rename sysemu/ -> system/ 8 months ago
microvm-dt.h microvm: add device tree support. 4 years ago
microvm.c hw/i386: Fix 'use-legacy-x86-rom' property compatibility 2 weeks ago
monitor.c qapi: expose rtc-reset-reinjection command unconditionally 3 months ago
multiboot.c exec/cpu-all: remove exec/target_page include 4 months ago
multiboot.h target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 4 years ago
nitro_enclave.c qom: Have class_init() take a const data argument 4 months ago
pc.c * rust: miscellaneous fixes 4 weeks ago
pc_piix.c hw/i386: Fix 'use-legacy-x86-rom' property compatibility 2 weeks ago
pc_q35.c hw/i386: Fix 'use-legacy-x86-rom' property compatibility 2 weeks ago
pc_sysfw.c i386/pc_sysfw: Ensure sysfw flash configuration does not conflict with IGVM 1 month ago
pc_sysfw_ovmf-stubs.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 4 years ago
pc_sysfw_ovmf.c exec/cpu-all: remove exec/target_page include 4 months ago
port92.c qom: Have class_init() take a const data argument 4 months ago
sgx-epc.c qom: Make InterfaceInfo[] uses const 4 months ago
sgx-stub.c qapi: make SGX commands unconditionally available 3 months ago
sgx.c qapi: make SGX commands unconditionally available 3 months ago
tdvf-hob.c i386/tdx: Setup the TD HOB list 3 months ago
tdvf-hob.h i386/tdx: Setup the TD HOB list 3 months ago
tdvf.c i386/tdvf: Fix build on 32-bit host 2 months ago
trace-events hw/i386/intel-iommu: Migrate to 3-phase reset 6 months ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
vapic.c qom: Have class_init() take a const data argument 4 months ago
vmmouse.c qom: Have class_init() take a const data argument 4 months ago
vmport.c qom: Have class_init() take a const data argument 4 months ago
x86-common.c i386/tdx: load TDVF for TD guest 3 months ago
x86-cpu.c include: Rename sysemu/ -> system/ 8 months ago
x86-iommu-stub.c hw/i386/pc: Remove x86_iommu_get_type() 4 years ago
x86-iommu.c qom: Have class_init() take a const data argument 4 months ago
x86.c hw/i386/x86: Remove X86MachineClass::save_tsc_khz field 2 months ago