diff mbox series

[4/5] target/s390x: Restrict sysemu/reset.h to system emulation

Message ID 20221220145625.26392-5-philmd@linaro.org
State New
Headers show
Series cpus: Remove system reset() API from user emulation | expand

Commit Message

Philippe Mathieu-Daudé Dec. 20, 2022, 2:56 p.m. UTC
In user emulation, threads -- implemented as CPU -- are
created/destroyed, but never reset. There is no point in
allowing the user emulation access the sysemu/reset API.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/cpu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Thomas Huth Dec. 29, 2022, 9:45 a.m. UTC | #1
On 20/12/2022 15.56, Philippe Mathieu-Daudé wrote:
> In user emulation, threads -- implemented as CPU -- are
> created/destroyed, but never reset. There is no point in
> allowing the user emulation access the sysemu/reset API.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/cpu.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
> index 96562c516d..b10a8541ff 100644
> --- a/target/s390x/cpu.c
> +++ b/target/s390x/cpu.c
> @@ -26,7 +26,6 @@
>   #include "s390x-internal.h"
>   #include "kvm/kvm_s390x.h"
>   #include "sysemu/kvm.h"
> -#include "sysemu/reset.h"
>   #include "qemu/module.h"
>   #include "trace.h"
>   #include "qapi/qapi-types-machine.h"
> @@ -35,6 +34,9 @@
>   #include "fpu/softfloat-helpers.h"
>   #include "disas/capstone.h"
>   #include "sysemu/tcg.h"
> +#ifndef CONFIG_USER_ONLY
> +#include "sysemu/reset.h"
> +#endif
>   
>   #define CR0_RESET       0xE0UL
>   #define CR14_RESET      0xC2000000UL;

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 96562c516d..b10a8541ff 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -26,7 +26,6 @@ 
 #include "s390x-internal.h"
 #include "kvm/kvm_s390x.h"
 #include "sysemu/kvm.h"
-#include "sysemu/reset.h"
 #include "qemu/module.h"
 #include "trace.h"
 #include "qapi/qapi-types-machine.h"
@@ -35,6 +34,9 @@ 
 #include "fpu/softfloat-helpers.h"
 #include "disas/capstone.h"
 #include "sysemu/tcg.h"
+#ifndef CONFIG_USER_ONLY
+#include "sysemu/reset.h"
+#endif
 
 #define CR0_RESET       0xE0UL
 #define CR14_RESET      0xC2000000UL;