[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for sysb
From: |
Zhao Liu |
Subject: |
Re: [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for sysbus reset |
Date: |
Tue, 27 Feb 2024 14:27:13 +0800 |
On Tue, Feb 20, 2024 at 04:06:21PM +0000, Peter Maydell wrote:
> Date: Tue, 20 Feb 2024 16:06:21 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for
> sysbus reset
> X-Mailer: git-send-email 2.34.1
>
> Move the reset of the sysbus (and thus all devices and buses anywhere
> on the qbus tree) from qemu_register_reset() to qemu_register_resettable().
>
> This is a behaviour change: because qemu_register_resettable() is
> aware of three-phase reset, this now means that:
> * 'enter' phase reset methods of devices and buses are called
> before any legacy reset callbacks registered with qemu_register_reset()
> * 'exit' phase reset methods of devices and buses are called
> after any legacy qemu_register_reset() callbacks
>
> Put another way, a qemu_register_reset() callback is now correctly
> ordered in the 'hold' phase along with any other 'hold' phase methods.
>
> The motivation for doing this is that we will now be able to resolve
> some reset-ordering issues using the three-phase mechanism, because
> the 'exit' phase is always after the 'hold' phase, even when the
> 'hold' phase function was registered with qemu_register_reset().
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I believe that given we don't make much use of enter/exit phases
> currently that this is unlikely to cause unexpected regressions due
> to an accidental reset-order dependency that is no longer satisfied,
> but it's always possible...
> ---
> hw/core/machine.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
- Re: [PATCH 10/10] docs/devel/reset: Update to discuss system reset, (continued)
- [PATCH 08/10] hw/core/reset: Implement qemu_register_reset via qemu_register_resettable, Peter Maydell, 2024/02/20
- [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for sysbus reset, Peter Maydell, 2024/02/20
- Re: [PATCH 00/10] reset: Make whole system three-phase-reset aware, Michael S. Tsirkin, 2024/02/20
- Re: [PATCH 00/10] reset: Make whole system three-phase-reset aware, Mark Cave-Ayland, 2024/02/21
- Re: [PATCH 00/10] reset: Make whole system three-phase-reset aware, Peter Maydell, 2024/02/26