[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC V2 17/37] arm/virt/acpi: Build CPUs AML with CPU Hotplug supp
From: |
Salil Mehta |
Subject: |
[PATCH RFC V2 17/37] arm/virt/acpi: Build CPUs AML with CPU Hotplug support |
Date: |
Tue, 26 Sep 2023 11:04:16 +0100 |
Support of vCPU Hotplug requires sequence of ACPI handshakes between Qemu and
Guest kernel when a vCPU is plugged or unplugged. Most of the AML code to
support these handshakes already exists. This AML need to be build during VM
init for ARM architecture as well if the GED support exists.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
hw/arm/virt-acpi-build.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 6b674231c2..d27df5030e 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -858,7 +858,18 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
VirtMachineState *vms)
* the RTC ACPI device at all when using UEFI.
*/
scope = aml_scope("\\_SB");
- acpi_dsdt_add_cpus(scope, vms);
+ /* if GED is enabled then cpus AML shall be added as part build_cpus_aml */
+ if (vms->acpi_dev) {
+ CPUHotplugFeatures opts = {
+ .acpi_1_compatible = false,
+ .has_legacy_cphp = false
+ };
+
+ build_cpus_aml(scope, ms, opts, memmap[VIRT_CPUHP_ACPI].base,
+ "\\_SB", NULL, AML_SYSTEM_MEMORY);
+ } else {
+ acpi_dsdt_add_cpus(scope, vms);
+ }
acpi_dsdt_add_uart(scope, &memmap[VIRT_UART],
(irqmap[VIRT_UART] + ARM_SPI_BASE));
if (vmc->acpi_expose_flash) {
--
2.34.1
- [PATCH RFC V2 13/37] hw/acpi: Init GED framework with cpu hotplug events, (continued)
- [PATCH RFC V2 13/37] hw/acpi: Init GED framework with cpu hotplug events, Salil Mehta, 2023/09/26
- [PATCH RFC V2 12/37] hw/acpi: Use qemu_present_cpu() API in ACPI CPU hotplug init, Salil Mehta, 2023/09/26
- [PATCH RFC V2 14/37] arm/virt: Add cpu hotplug events to GED during creation, Salil Mehta, 2023/09/26
- [PATCH RFC V2 15/37] arm/virt: Create GED dev before *disabled* CPU Objs are destroyed, Salil Mehta, 2023/09/26
- [PATCH RFC V2 16/37] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change, Salil Mehta, 2023/09/26
- [PATCH RFC V2 17/37] arm/virt/acpi: Build CPUs AML with CPU Hotplug support,
Salil Mehta <=
- [PATCH RFC V2 18/37] arm/virt: Make ARM vCPU *present* status ACPI *persistent*, Salil Mehta, 2023/09/26
- [PATCH RFC V2 19/37] hw/acpi: ACPI/AML Changes to reflect the correct _STA.{PRES, ENA} Bits to Guest, Salil Mehta, 2023/09/26
- [PATCH RFC V2 20/37] hw/acpi: Update GED _EVT method AML with cpu scan, Salil Mehta, 2023/09/26
- [PATCH RFC V2 21/37] hw/arm: MADT Tbl change to size the guest with possible vCPUs, Salil Mehta, 2023/09/26
- [PATCH RFC V2 22/37] hw/acpi: Make _MAT method optional, Salil Mehta, 2023/09/26