qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Annie Li <annie.li@oracle.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: miguel.luis@oracle.com, qemu-devel@nongnu.org,
	qemu-arm@nongnu.org, dave@treblig.org, mst@redhat.com,
	anisinha@redhat.com, shannon.zhaosl@gmail.com,
	peter.maydell@linaro.org, eduardo@habkost.net,
	marcel.apfelbaum@gmail.com, philmd@linaro.org,
	wangyanan55@huawei.com, zhao1.liu@intel.com, pbonzini@redhat.com,
	richard.henderson@linaro.org, eblake@redhat.com,
	armbru@redhat.com
Subject: Re: [RFC V2 PATCH 04/11] acpi: Support Control Method sleep button for x86
Date: Tue, 8 Oct 2024 11:33:50 -0400	[thread overview]
Message-ID: <688859f2-5d06-4012-8872-340085144a3e@oracle.com> (raw)
In-Reply-To: <20241007153236.2b4d3ad6@imammedo.users.ipa.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]


On 10/7/2024 9:32 AM, Igor Mammedov wrote:
> On Fri, 27 Sep 2024 14:38:59 -0400
> Annie Li<annie.li@oracle.com> wrote:
>
>> Adding Control Method Sleep button and its GPE event handler for
>> x86.
>>
>> Signed-off-by: Annie Li<annie.li@oracle.com>
>> ---
>>   hw/i386/acpi-build.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
>> index 5d4bd2b710..ee62333a03 100644
>> --- a/hw/i386/acpi-build.c
>> +++ b/hw/i386/acpi-build.c
>> @@ -40,6 +40,7 @@
>>   #include "hw/acpi/acpi_aml_interface.h"
>>   #include "hw/input/i8042.h"
>>   #include "hw/acpi/memory_hotplug.h"
>> +#include "hw/acpi/control_method_device.h"
>>   #include "sysemu/tpm.h"
>>   #include "hw/acpi/tpm.h"
>>   #include "hw/acpi/vmgenid.h"
>> @@ -1527,6 +1528,14 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>>       }
>>       aml_append(dsdt, scope);
>>   
>> +    sb_scope = aml_scope("_SB");
>> +    acpi_dsdt_add_sleep_button(sb_scope);
>> +    aml_append(dsdt, sb_scope);
>> +
>> +    scope =  aml_scope("\\_GPE");
>> +    acpi_dsdt_add_sleep_gpe_event_handler(scope);
> instead of having 1-off function, it would be better to inline impl,
> here, like we do elsewhere with _Exx methods.
Was thinking that "acpi_dsdt_add_sleep_button" is shared by multiple 
platforms, and "acpi_dsdt_add_sleep_gpe_event_handler" is related this 
function. However, it totally makes sense to inline this function since 
it is only being used once for x86.
>
> Also given that, series doesn't support wake,
> you don't need to copy example from spec related to operation region,
> as dedicated GPE event by itself tells us that sleep was requested.
>
> so all you need to do is sending Notify to sleep button device.
Got it, thanks for the feedback.

Thanks
Annie
>
>> +    aml_append(dsdt, scope);
>> +
>>       if (pcmc->legacy_cpu_hotplug) {
>>           build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
>>       } else {

[-- Attachment #2: Type: text/html, Size: 3365 bytes --]

  reply	other threads:[~2024-10-08 15:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 18:38 [RFC V2 PATCH 00/11] Support ACPI Control Method Sleep button Annie Li
2024-09-27 18:38 ` [RFC V2 PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep Annie Li
2024-10-07 12:44   ` Igor Mammedov
2024-10-08 15:21     ` Annie Li
2024-09-27 18:38 ` [RFC V2 PATCH 02/11] acpi: Implement control method sleep button Annie Li
2024-10-07 12:59   ` Igor Mammedov
2024-10-08 15:22     ` Annie Li
2024-10-11 12:10       ` Igor Mammedov
2024-09-27 18:38 ` [RFC V2 PATCH 03/11] test/acpi: allow DSDT table changes Annie Li
2024-09-27 18:38 ` [RFC V2 PATCH 04/11] acpi: Support Control Method sleep button for x86 Annie Li
2024-10-07 13:32   ` Igor Mammedov
2024-10-08 15:33     ` Annie Li [this message]
2024-09-27 18:39 ` [RFC V2 PATCH 05/11] tests/acpi: Update DSDT tables for Control method sleep button Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 06/11] acpi: Send the GPE event of suspend and wakeup for x86 Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 07/11] hw/acpi: Add ACPI GED support for the sleep event Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 08/11] tests/acpi: allow FACP and DSDT table changes for arm/virt Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 09/11] hw/arm: enable sleep support " Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 10/11] tests/acpi: Update FACP and DSDT tables for sleep button Annie Li
2024-09-27 18:39 ` [RFC V2 PATCH 11/11] arm/virt: enable sleep support Annie Li
2024-10-08 11:53   ` Peter Maydell
2024-10-10 12:43     ` Miguel Luis
2024-10-07 13:41 ` [RFC V2 PATCH 00/11] Support ACPI Control Method Sleep button Igor Mammedov
2024-10-08 15:21   ` Annie Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=688859f2-5d06-4012-8872-340085144a3e@oracle.com \
    --to=annie.li@oracle.com \
    --cc=anisinha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=miguel.luis@oracle.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).