On Fri, Jun 20, 2025 at 11:30:09AM +0800, liu.xuem...@zte.com.cn wrote:
> From: Xuemei Liu <liu.xuem...@zte.com.cn>
> 
> This adds powerdown support by implementing the ACPI GED.
> 
> Signed-off-by: Xuemei Liu <liu.xuem...@zte.com.cn>
> Co-authored-by: Björn Töpel <bj...@rivosinc.com>
> 
> ---
> Changes in v2:
> - Unwrappered acpi_dsdt_add_ged function
> - Modified base address of VIRT_ACPI_GED
> - Added conditions for function calls
> - Adjusted code formatting
> 
>  hw/riscv/Kconfig           |  1 +
>  hw/riscv/virt-acpi-build.c | 10 ++++++++++
>  hw/riscv/virt.c            | 35 +++++++++++++++++++++++++++++++++++
>  include/hw/riscv/virt.h    |  4 ++++
>  4 files changed, 50 insertions(+)
> 
[...]
> +
> +static void virt_powerdown_req(Notifier *notifier, void *opaque)
> +{
> +    RISCVVirtState *s;
> +
> +    s = container_of(notifier, RISCVVirtState, powerdown_notifier);
> +    acpi_send_event(s->acpi_ged, ACPI_POWER_DOWN_STATUS);
Did you miss my comment here?

> +}
> +
>  static void virt_machine_done(Notifier *notifier, void *data)
>  {
>      RISCVVirtState *s = container_of(notifier, RISCVVirtState,
> @@ -1703,6 +1730,11 @@ static void virt_machine_init(MachineState *machine)
> 
>      create_platform_bus(s, mmio_irqchip);
> 
> +    /* acpi ged */
> +    if (virt_is_acpi_enabled()) {
Daniel has already reported the issue here. Since you are changing the
ACPI tables like DSDT you need to add additional commits to update the
expected DSDT file so that CI tests succeed. Please refer to the
comments in the file tests/qtest/bios-tables-test.c for detailed
procedure.

Thanks
Sunil

Reply via email to