[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC V2 20/37] hw/acpi: Update GED _EVT method AML with cpu scan
From: |
Salil Mehta |
Subject: |
[PATCH RFC V2 20/37] hw/acpi: Update GED _EVT method AML with cpu scan |
Date: |
Tue, 26 Sep 2023 11:04:19 +0100 |
OSPM evaluates _EVT method to map the event. The cpu hotplug event eventually
results in start of the cpu scan. Scan figures out the cpu and the kind of
event(plug/unplug) and notifies it back to the guest.
The change in this patch updates the GED AML _EVT method with the call to
\\_SB.CPUS.CSCN which will do above.
Co-developed-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Co-developed-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
hw/acpi/generic_event_device.c | 4 ++++
include/hw/acpi/cpu_hotplug.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index b84602b238..ad252e6a91 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -108,6 +108,10 @@ void build_ged_aml(Aml *table, const char *name,
HotplugHandler *hotplug_dev,
aml_append(if_ctx, aml_call0(MEMORY_DEVICES_CONTAINER "."
MEMORY_SLOT_SCAN_METHOD));
break;
+ case ACPI_GED_CPU_HOTPLUG_EVT:
+ aml_append(if_ctx, aml_call0(ACPI_CPU_CONTAINER "."
+ ACPI_CPU_SCAN_METHOD));
+ break;
case ACPI_GED_PWR_DOWN_EVT:
aml_append(if_ctx,
aml_notify(aml_name(ACPI_POWER_BUTTON_DEVICE),
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
index 48b291e45e..ef631750b4 100644
--- a/include/hw/acpi/cpu_hotplug.h
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -20,6 +20,8 @@
#include "hw/acpi/cpu.h"
#define ACPI_CPU_HOTPLUG_REG_LEN 12
+#define ACPI_CPU_SCAN_METHOD "CSCN"
+#define ACPI_CPU_CONTAINER "\\_SB.CPUS"
typedef struct AcpiCpuHotplug {
Object *device;
--
2.34.1
- [PATCH RFC V2 15/37] arm/virt: Create GED dev before *disabled* CPU Objs are destroyed, (continued)
- [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, 2023/09/26
- [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 <=
- [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
- [PATCH RFC V2 23/37] arm/virt: Release objects for *disabled* possible vCPUs after init, Salil Mehta, 2023/09/26
- [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug, Salil Mehta, 2023/09/26