[PATCH] acpi/ged: fix reset cause

Gerd Hoffmann posted 1 patch 4 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210624110057.2398779-1-kraxel@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>
hw/acpi/generic_event_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] acpi/ged: fix reset cause
Posted by Gerd Hoffmann 4 years, 7 months ago
Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not
SHUTDOWN_CAUSE_GUEST_SHUTDOWN.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/acpi/generic_event_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 39c825763ad8..e28457a7d103 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -207,7 +207,7 @@ static void ged_regs_write(void *opaque, hwaddr addr, uint64_t data,
         return;
     case ACPI_GED_REG_RESET:
         if (data == ACPI_GED_RESET_VALUE) {
-            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
+            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
         }
         return;
     }
-- 
2.31.1


Re: [PATCH] acpi/ged: fix reset cause
Posted by Peter Maydell 4 years, 7 months ago
On Thu, 24 Jun 2021 at 12:01, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not
> SHUTDOWN_CAUSE_GUEST_SHUTDOWN.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/acpi/generic_event_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> index 39c825763ad8..e28457a7d103 100644
> --- a/hw/acpi/generic_event_device.c
> +++ b/hw/acpi/generic_event_device.c
> @@ -207,7 +207,7 @@ static void ged_regs_write(void *opaque, hwaddr addr, uint64_t data,
>          return;
>      case ACPI_GED_REG_RESET:
>          if (data == ACPI_GED_RESET_VALUE) {
> -            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> +            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
>          }
>          return;
>      }
> --
> 2.31.1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

Re: [PATCH] acpi/ged: fix reset cause
Posted by Michael S. Tsirkin 4 years, 7 months ago
On Thu, Jun 24, 2021 at 12:06:14PM +0100, Peter Maydell wrote:
> On Thu, 24 Jun 2021 at 12:01, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not
> > SHUTDOWN_CAUSE_GUEST_SHUTDOWN.
> >
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> >  hw/acpi/generic_event_device.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> > index 39c825763ad8..e28457a7d103 100644
> > --- a/hw/acpi/generic_event_device.c
> > +++ b/hw/acpi/generic_event_device.c
> > @@ -207,7 +207,7 @@ static void ged_regs_write(void *opaque, hwaddr addr, uint64_t data,
> >          return;
> >      case ACPI_GED_REG_RESET:
> >          if (data == ACPI_GED_RESET_VALUE) {
> > -            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> > +            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
> >          }
> >          return;
> >      }
> > --
> > 2.31.1
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> thanks
> -- PMM

tagged, thanks!


Re: [PATCH] acpi/ged: fix reset cause
Posted by Philippe Mathieu-Daudé 4 years, 7 months ago
On 6/24/21 1:00 PM, Gerd Hoffmann wrote:
> Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not
> SHUTDOWN_CAUSE_GUEST_SHUTDOWN.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/acpi/generic_event_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>