[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan |
Date: |
Tue, 23 Jul 2024 06:59:18 -0400 |
From: Salil Mehta <salil.mehta@huawei.com>
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. Update the GED AML _EVT
method with the call to method \\_SB.CPUS.CSCN (via \\_SB.GED.CSCN)
Architecture specific code [1] might initialize its CPUs AML code by calling
common function build_cpus_aml() like below for ARM:
build_cpus_aml(scope, ms, opts, xx_madt_cpu_entry, memmap[VIRT_CPUHP_ACPI].base,
"\\_SB", "\\_SB.GED.CSCN", AML_SYSTEM_MEMORY);
[1]
https://lore.kernel.org/qemu-devel/20240613233639.202896-13-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>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-5-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/acpi/generic_event_device.h | 1 +
hw/acpi/generic_event_device.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/include/hw/acpi/generic_event_device.h
b/include/hw/acpi/generic_event_device.h
index e091ac2108..40af3550b5 100644
--- a/include/hw/acpi/generic_event_device.h
+++ b/include/hw/acpi/generic_event_device.h
@@ -87,6 +87,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED)
#define GED_DEVICE "GED"
#define AML_GED_EVT_REG "EREG"
#define AML_GED_EVT_SEL "ESEL"
+#define AML_GED_EVT_CPU_SCAN_METHOD "\\_SB.GED.CSCN"
/*
* Platforms need to specify the GED event bitmap
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 4641933a0f..15b4c3ebbf 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -108,6 +108,9 @@ 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(AML_GED_EVT_CPU_SCAN_METHOD));
+ break;
case ACPI_GED_PWR_DOWN_EVT:
aml_append(if_ctx,
aml_notify(aml_name(ACPI_POWER_BUTTON_DEVICE),
--
MST
- [PULL v2 33/61] virtio-pci: Implement SR-IOV PF, (continued)
- [PULL v2 33/61] virtio-pci: Implement SR-IOV PF, Michael S. Tsirkin, 2024/07/23
- [PULL v2 32/61] pcie_sriov: Allow user to create SR-IOV device, Michael S. Tsirkin, 2024/07/23
- [PULL v2 34/61] virtio-net: Implement SR-IOV VF, Michael S. Tsirkin, 2024/07/23
- [PULL v2 35/61] docs: Document composable SR-IOV device, Michael S. Tsirkin, 2024/07/23
- [PULL v2 36/61] smbios: make memory device size configurable per Machine, Michael S. Tsirkin, 2024/07/23
- [PULL v2 37/61] accel/kvm: Extract common KVM vCPU {creation,parking} code, Michael S. Tsirkin, 2024/07/23
- [PULL v2 38/61] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file, Michael S. Tsirkin, 2024/07/23
- [PULL v2 39/61] hw/acpi: Update ACPI GED framework to support vCPU Hotplug, Michael S. Tsirkin, 2024/07/23
- [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan,
Michael S. Tsirkin <=
- [PULL v2 41/61] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change, Michael S. Tsirkin, 2024/07/23
- [PULL v2 42/61] physmem: Add helper function to destroy CPU AddressSpace, Michael S. Tsirkin, 2024/07/23
- [PULL v2 43/61] gdbstub: Add helper function to unregister GDB register space, Michael S. Tsirkin, 2024/07/23
- [PULL v2 45/61] virtio-iommu: Remove probe_done, Michael S. Tsirkin, 2024/07/23
- [PULL v2 44/61] Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged", Michael S. Tsirkin, 2024/07/23
- [PULL v2 46/61] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices, Michael S. Tsirkin, 2024/07/23
- [PULL v2 50/61] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC, Michael S. Tsirkin, 2024/07/23
- [PULL v2 47/61] virtio-iommu: Remove the end point on detach, Michael S. Tsirkin, 2024/07/23
- [PULL v2 48/61] hw/vfio/common: Add vfio_listener_region_del_iommu trace event, Michael S. Tsirkin, 2024/07/23
- [PULL v2 49/61] virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain, Michael S. Tsirkin, 2024/07/23