acpi/gpex: Create PCI link devices outside PCI root bridge
authorSunil V L <sunilvl@ventanamicro.com>
Tue, 16 Jul 2024 14:43:01 +0000 (20:13 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 23 Jul 2024 00:15:42 +0000 (20:15 -0400)
commit35520bc702a8c3d7b434305ac403de437003d4bc
treeb6a7b98c5a3fdf72c879cb0d4de30fc1cbe3c9ab
parentaf09c25199a15925c34ae8c9635a79a81fd9b499
acpi/gpex: Create PCI link devices outside PCI root bridge

Currently, PCI link devices (PNP0C0F) are always created within the
scope of the PCI root bridge. However, RISC-V needs these link devices
to be created outside to ensure the probing order in the OS. This
matches the example given in the ACPI specification [1] as well. Hence,
create these link devices directly under _SB instead of under the PCI
root bridge.

To keep these link device names unique for multiple PCI bridges, change
the device name from GSIx to LXXY format where XX is the PCI bus number
and Y is the INTx.

GPEX is currently used by riscv, aarch64/virt and x86/microvm machines.
So, this change will alter the DSDT for those systems.

[1] - ACPI 5.1: 6.2.13.1 Example: Using _PRT to Describe PCI IRQ Routing

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-5-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-host/gpex-acpi.c