qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system e


From: Paolo Bonzini
Subject: Re: [PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system emulation
Date: Mon, 8 Apr 2024 12:09:13 +0200

On Thu, Apr 4, 2024 at 9:48 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Headers in include/sysemu/ are specific to system
> emulation and should not be used in user emulation.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/core/reset.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/hw/core/reset.c b/hw/core/reset.c
> index d50da7e304..167c8bf1a9 100644
> --- a/hw/core/reset.c
> +++ b/hw/core/reset.c
> @@ -24,7 +24,9 @@
>   */
>
>  #include "qemu/osdep.h"
> +#ifndef CONFIG_USER_ONLY
>  #include "sysemu/reset.h"
> +#endif
>  #include "hw/resettable.h"
>  #include "hw/core/resetcontainer.h"
>
> @@ -43,6 +45,7 @@ static ResettableContainer *get_root_reset_container(void)
>      return root_reset_container;
>  }
>
> +#ifndef CONFIG_USER_ONLY

Wait, this does not make sense. The only thing left in the file is a
single static function, which contradicts the other patch's commit
message "reset.c contains core code used by any CPU,".

Let me rework these two patches so that reset.c, qdev-hotplug.c and
hotplug.c can be moved to system_ss. I'll post a v2 shortly.

Paolo

>  /*
>   * Reason why the currently in-progress qemu_devices_reset() was called.
>   * If we made at least SHUTDOWN_CAUSE_SNAPSHOT_LOAD have a corresponding
> @@ -185,3 +188,4 @@ void qemu_devices_reset(ShutdownCause reason)
>      /* Reset the simulation */
>      resettable_reset(OBJECT(get_root_reset_container()), RESET_TYPE_COLD);
>  }
> +#endif
> --
> 2.41.0
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]