Skip to content

RFC APCI PCI Hotplug support on ARM

Eric Auger qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest24 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24hw/pci/pcie_port: Fix pcie_slot_is_hotpluggbale_bus typohw/pci/pcie_port.c+2 -21 reply
2/24hw/acpi/ged: Fix wrong identationhw/acpi/generic_event_device.c+5 -51 reply
3/24hw/i386/acpi-build: Fix build_append_notfication_callback typohw/i386/acpi-build.c+4 -41 reply
4/24hw/i386/acpi-build: Make aml_pci_device_dsm() statichw/i386/acpi-build.c include/hw/acpi/pci.h+1 -20 replies
5/24hw/arm/virt: Introduce machine state acpi pcihp flags and propshw/arm/virt.c include/hw/arm/virt.h+29 -02 replies
6/24hw/acpi: Rename and move build_x86_acpi_pci_hotplug to pcihphw/acpi/pcihp.c hw/i386/acpi-build.c hw/i386/acpi-build.h +1 more+181 -1532 replies
7/24hw/pci-host/gpex-acpi: Add native_pci_hotplug arg to acpi_dsdt_add_pci_oschw/pci-host/gpex-acpi.c+6 -52 replies
8/24hw/pci-host/gpex-acpi: Split host bridge OSC and DSM generationhw/pci-host/gpex-acpi.c+21 -101 reply
9/24hw/pci-host/gpex-acpi: Propagate hotplug type info from virt machine downto gpexhw/arm/virt-acpi-build.c hw/pci-host/gpex-acpi.c include/hw/pci-host/gpex.h+4 -11 reply
10/24hw/i386/acpi-build: Turn build_q35_osc_method into a generic methodhw/acpi/aml-build.c hw/i386/acpi-build.c include/hw/acpi/aml-build.h+54 -520 replies
11/24hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_methoddsdt.dsl_after_osc_change hw/pci-host/gpex-acpi.c+13 -660 replies
12/24hw/i386/acpi-build: Introduce build_append_pcihp_resources() helperhw/acpi/pcihp.c hw/i386/acpi-build.c include/hw/acpi/pcihp.h+24 -130 replies
13/24hw/acpi/pcihp: Add an AmlRegionSpace arg to build_acpi_pci_hotplughw/acpi/pcihp.c hw/i386/acpi-build.c include/hw/acpi/pcihp.h+8 -70 replies
14/24hw/i386/acpi-build: Move build_append_notification_callback to pcihphw/acpi/pcihp.c hw/i386/acpi-build.c include/hw/acpi/pcihp.h+59 -580 replies
15/24hw/i386/acpi-build: Move remaining pcihp generic functions to pcihphw/acpi/pcihp.c hw/i386/acpi-build.c include/hw/acpi/pci.h +1 more+175 -1730 replies
16/24hw/i386/acpi-build: Introduce and use acpi_get_pci_hosthw/acpi/pci.c hw/acpi/pcihp.c hw/i386/acpi-build.c +1 more+28 -210 replies
17/24hw/arm/virt-acpi-build: Add DSDT additions for PCI hotplughw/arm/Kconfig hw/arm/virt-acpi-build.c hw/arm/virt.c +1 more+28 -00 replies
18/24hw/acpi/ged: Prepare the device to react to PCI hotplug eventshw/acpi/generic_event_device.c include/hw/acpi/generic_event_device.h include/hw/acpi/pcihp.h+21 -02 replies
19/24hw/acpi/ged: Call pcihp plug callbacks in hotplug handler implementationhw/acpi/generic_event_device.c+20 -00 replies
20/24hw/acpi/ged: Support migration of AcpiPciHpStatehw/acpi/generic_event_device.c+20 -00 replies
21/24hw/core/sysbus: Introduce sysbus_mmio_map_name() helperhw/core/sysbus.c include/hw/sysbus.h+12 -00 replies
22/24hw/arm/virt: Let virt support pci hotplug/unplug GED eventhw/arm/virt-acpi-build.c hw/arm/virt.c include/hw/arm/virt.h+32 -50 replies
23/24hw/arm/virt: Plug pcihp hotplug/hotunplug callbackshw/arm/virt.c+36 -10 replies
24/24hw/arm/virt: Use ACPI PCI hotplug by defaulthw/arm/virt.c+2 -20 replies

Reviews trailers per patch

8 of 24 patches have a Reviewed-by or Acked-by.

PatchGustavo Romero
1/24R-b
2/24R-b
3/24R-b
4/24
5/24R-b
6/24R-b
7/24R-b
8/24R-b
9/24R-b
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
24/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 00/24] APCI PCI Hotplug support on ARM

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/[email protected]/

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(-)
Signature · 1 line
2.49.0