Hi Bibo, > From: maobibo <[email protected]> > Sent: Tuesday, October 15, 2024 2:20 AM > To: Salil Mehta <[email protected]>; [email protected] > > Hi Salil, > > On 2024/10/15 上午3:59, Salil Mehta wrote: > > Hi Bibo, > > > >> From: maobibo <[email protected]> > >> Sent: Monday, October 14, 2024 9:53 AM > >> To: [email protected]; Salil Mehta <[email protected]> > >> Cc: Michael S. Tsirkin <[email protected]>; Peter Maydell > >> <[email protected]>; Salil Mehta <[email protected]>; > >> zhukeqian <[email protected]>; Jonathan Cameron > >> <[email protected]>; Gavin Shan <[email protected]>; > >> Vishnu Pajjuri <[email protected]>; Xianglai Li > >> <[email protected]>; Miguel Luis <[email protected]>; > Shaoqin > >> Huang <[email protected]>; Zhao Liu <[email protected]>; Igor > >> Mammedov <[email protected]>; Ani Sinha > <[email protected]> > >> Subject: Re: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML > with > >> CPU scan > >> > >> Hi Salil, > >> > >> When I debug cpu hotplug on LoongArch system, It reports error like > this: > >> ACPI BIOS Error (bug): Could not resolve symbol [\_SB.GED.CSCN], > >> AE_NOT_FOUND > >> ACPI Error: Aborting method \_SB.GED._EVT due to previous error > >> (AE_NOT_FOUND) > >> acpi-ged ACPI0013:00: IRQ method execution failed > >> > >> > >> With this patch, GED CPU call method is "\\_SB.GED.CSCN", however in > >> function build_cpus_aml(), its method name is "\\_SB.CPUS.CSCN". > >> method = aml_method(event_handler_method, 0, > >> AML_NOTSERIALIZED); > >> aml_append(method, aml_call0("\\_SB.CPUS." > CPU_SCAN_METHOD)); > >> aml_append(table, method); > >> > >> It seems that CPU scanning method name is not consistent between > >> function build_cpus_aml() and build_ged_aml(). > > > > > > I believe your question stems from the following patch I've sent recently: > > > > https://lore.kernel.org/qemu-devel/20241009031815.250096-16-salil.meht > > [email protected]/ > > > > I’ve already proposed a fix for this issue. Does that not work for you? > yes, it works for me if AML_GED_EVT_CPU_SCAN_METHOD is used as > parameter in function build_cpus_aml(). > > Sorry for the noise.
No issues. Good that it got sorted 😊 Cheers Salil. > > Regards > Bibo Mao > > > > Thanks > > Salil. > > > > > >> > >> Regards > >> Bibo Mao > >> > >> On 2024/7/23 下午6:59, Michael S. Tsirkin wrote: > >> > From: Salil Mehta <[email protected]> > >> > > >> > 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.meht > >> > [email protected]/ > >> > > >> > Co-developed-by: Keqian Zhu <[email protected]> > >> > Signed-off-by: Keqian Zhu <[email protected]> > >> > Signed-off-by: Salil Mehta <[email protected]> > >> > Reviewed-by: Jonathan Cameron <[email protected]> > >> > Reviewed-by: Gavin Shan <[email protected]> > >> > Tested-by: Vishnu Pajjuri <[email protected]> > >> > Tested-by: Xianglai Li <[email protected]> > >> > Tested-by: Miguel Luis <[email protected]> > >> > Reviewed-by: Shaoqin Huang <[email protected]> > >> > Tested-by: Zhao Liu <[email protected]> > >> > Reviewed-by: Igor Mammedov <[email protected]> > >> > Message-Id: <[email protected]> > >> > Reviewed-by: Michael S. Tsirkin <[email protected]> > >> > Signed-off-by: Michael S. Tsirkin <[email protected]> > >> > --- > >> > 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), > >> > > >
