[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] reset: Use ResetType for qemu_devices_reset() and Machin
From: |
Juraj Marcin |
Subject: |
Re: [PATCH 1/4] reset: Use ResetType for qemu_devices_reset() and MachineClass->reset() |
Date: |
Wed, 7 Aug 2024 12:03:44 +0200 |
On Tue, Aug 6, 2024 at 6:40 PM David Hildenbrand <david@redhat.com> wrote:
>
> On 06.08.24 18:07, Juraj Marcin wrote:
> > Currently, both qemu_devices_reset() and MachineClass->reset() use
> > ShutdownCause for the reason of the reset. However, the Resettable
> > interface uses ResetState, so ShutdownCause needs to be translated to
> > ResetType somewhere. Translating it qemu_devices_reset() makes adding
> > new reset types harder, as they cannot always be matched to a single
> > ShutdownCause here, and devices may need to check the ResetType to
> > determine what to reset and if to reset at all.
> >
> > This patch moves this translation up in the call stack to
> > qemu_system_reset() and updates all MachineClass children to use the
> > ResetType instead.
> >
> > Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
> > ---
>
> [...]
>
> >
> > static void mps2tz_class_init(ObjectClass *oc, void *data)
> > diff --git a/hw/core/reset.c b/hw/core/reset.c
> > index 58dfc8db3d..60c9c66d81 100644
> > --- a/hw/core/reset.c
> > +++ b/hw/core/reset.c
> > @@ -25,8 +25,8 @@
> >
> > #include "qemu/osdep.h"
> > #include "sysemu/reset.h"
> > -#include "hw/resettable.h"
> > #include "hw/core/resetcontainer.h"
> > +#include "hw/resettable.h"
>
> Curious, is that change really required?
You are right, it is not required. I will fix it when some more
feedback comes in. Thank you!
>
> Apart from that LGTM!
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
> --
> Cheers,
>
> David / dhildenb
>
--
Juraj Marcin
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, (continued)
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, Juraj Marcin, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, David Hildenbrand, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, Peter Maydell, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, David Hildenbrand, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, Peter Maydell, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, David Hildenbrand, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, Peter Maydell, 2024/08/08
- Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP, David Hildenbrand, 2024/08/08
[PATCH 1/4] reset: Use ResetType for qemu_devices_reset() and MachineClass->reset(), Juraj Marcin, 2024/08/06
[PATCH 4/4] virtio-mem: Add support for suspend+wake-up with plugged memory, Juraj Marcin, 2024/08/06
[PATCH 3/4] virtio-mem: Implement Resettable interface instead of using LegacyReset, Juraj Marcin, 2024/08/06