This series enables APCI PCI hotplug/hotunplug on ARM and makes it default for 10.1 machine type. This aligns with x86 q35 machine. Expected benefits should be similar to those listed in [1].
The infrastructure used in x86 is heavily reused and a huge part of the series consists in moving code from hw/i386/acpi-build.c to a generic place and slightly adapting it to make it usable on ARM. The DSDT table is augmented to support ACPI PCI hotplug elements. On ARM we use use a GED event to notify the OS about hotplug events. I have not noticed any tests/qtest/bios-tables-test failures neither on x86 nor ARM. x86 DSDT table has not changed. ARM DSDT table definitively has but there are no tests impacted. ARM misses hotplug tests that do exist on x86. This most probably should be considered in the future. Best Regards Eric This series can be found at: https://github.com/eauger/qemu/tree/arm-acpi-pcihp-rfc [1] [PATCH v6 0/6] Use ACPI PCI hot-plug for Q35 https://lore.kernel.org/all/20210713004205.775386-1-jus...@redhat.com/ Eric Auger (24): hw/pci/pcie_port: Fix pcie_slot_is_hotpluggbale_bus typo hw/acpi/ged: Fix wrong identation hw/i386/acpi-build: Fix build_append_notfication_callback typo hw/i386/acpi-build: Make aml_pci_device_dsm() static hw/arm/virt: Introduce machine state acpi pcihp flags and props hw/acpi: Rename and move build_x86_acpi_pci_hotplug to pcihp hw/pci-host/gpex-acpi: Add native_pci_hotplug arg to acpi_dsdt_add_pci_osc hw/pci-host/gpex-acpi: Split host bridge OSC and DSM generation hw/pci-host/gpex-acpi: Propagate hotplug type info from virt machine downto gpex hw/i386/acpi-build: Turn build_q35_osc_method into a generic method hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method hw/i386/acpi-build: Introduce build_append_pcihp_resources() helper hw/acpi/pcihp: Add an AmlRegionSpace arg to build_acpi_pci_hotplug hw/i386/acpi-build: Move build_append_notification_callback to pcihp hw/i386/acpi-build: Move remaining pcihp generic functions to pcihp hw/i386/acpi-build: Introduce and use acpi_get_pci_host hw/arm/virt-acpi-build: Add DSDT additions for PCI hotplug hw/acpi/ged: Prepare the device to react to PCI hotplug events hw/acpi/ged: Call pcihp plug callbacks in hotplug handler implementation hw/acpi/ged: Support migration of AcpiPciHpState hw/core/sysbus: Introduce sysbus_mmio_map_name() helper hw/arm/virt: Let virt support pci hotplug/unplug GED event hw/arm/virt: Plug pcihp hotplug/hotunplug callbacks hw/arm/virt: Use ACPI PCI hotplug by default hw/i386/acpi-build.h | 4 - include/hw/acpi/aml-build.h | 2 + include/hw/acpi/generic_event_device.h | 5 + include/hw/acpi/pci.h | 4 +- include/hw/acpi/pcihp.h | 14 + include/hw/arm/virt.h | 4 + include/hw/pci-host/gpex.h | 1 + include/hw/sysbus.h | 1 + hw/acpi/aml-build.c | 50 +++ hw/acpi/generic_event_device.c | 64 +++- hw/acpi/pci.c | 20 ++ hw/acpi/pcihp.c | 428 +++++++++++++++++++++- hw/arm/virt-acpi-build.c | 26 ++ hw/arm/virt.c | 100 +++++- hw/core/sysbus.c | 11 + hw/i386/acpi-build.c | 475 +------------------------ hw/pci-host/gpex-acpi.c | 75 +--- hw/pci/pcie_port.c | 4 +- hw/arm/Kconfig | 2 + 19 files changed, 748 insertions(+), 542 deletions(-) -- 2.49.0