qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for 10.1] microvm: Explicitly select ACPI_PCI
@ 2025-08-04 15:20 Eric Auger
  2025-08-04 17:36 ` Michael Tokarev
  2025-08-05 14:26 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Auger @ 2025-08-04 15:20 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, qemu-devel, pbonzini,
	richard.henderson, mst, kraxel, mjt

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: af151d50eac24 "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>
---
 hw/i386/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 5139d23087..3a0e2b8ebb 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -131,6 +131,7 @@ config MICROVM
     select I8259
     select MC146818RTC
     select VIRTIO_MMIO
+    select ACPI_PCI
     select ACPI_HW_REDUCED
     select PCI_EXPRESS_GENERIC_BRIDGE
     select USB_XHCI_SYSBUS
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for 10.1] microvm: Explicitly select ACPI_PCI
  2025-08-04 15:20 [PATCH for 10.1] microvm: Explicitly select ACPI_PCI Eric Auger
@ 2025-08-04 17:36 ` Michael Tokarev
  2025-08-05 14:26 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2025-08-04 17:36 UTC (permalink / raw)
  To: Eric Auger, eric.auger.pro, qemu-devel, pbonzini,
	richard.henderson, mst, kraxel

On 04.08.2025 18:20, Eric Auger wrote:
> 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: af151d50eac24 "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>

This seems to be a better fix than I proposed.

Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>

Thanks,

/mjt

> ---
>   hw/i386/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 5139d23087..3a0e2b8ebb 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -131,6 +131,7 @@ config MICROVM
>       select I8259
>       select MC146818RTC
>       select VIRTIO_MMIO
> +    select ACPI_PCI
>       select ACPI_HW_REDUCED
>       select PCI_EXPRESS_GENERIC_BRIDGE
>       select USB_XHCI_SYSBUS



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for 10.1] microvm: Explicitly select ACPI_PCI
  2025-08-04 15:20 [PATCH for 10.1] microvm: Explicitly select ACPI_PCI Eric Auger
  2025-08-04 17:36 ` Michael Tokarev
@ 2025-08-05 14:26 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-05 14:26 UTC (permalink / raw)
  To: Eric Auger, eric.auger.pro, qemu-devel, pbonzini,
	richard.henderson, mst, kraxel, mjt

On 4/8/25 17:20, Eric Auger wrote:
> 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: af151d50eac24 "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>
> ---
>   hw/i386/Kconfig | 1 +
>   1 file changed, 1 insertion(+)

Patch queued, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-05 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 15:20 [PATCH for 10.1] microvm: Explicitly select ACPI_PCI Eric Auger
2025-08-04 17:36 ` Michael Tokarev
2025-08-05 14:26 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).