diff mbox series

[3/5] target/loongarch: Restrict sysemu/reset.h to system emulation

Message ID 20221220145625.26392-4-philmd@linaro.org (mailing list archive)
State New, archived
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/loongarch/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 0fb853d915..441dfbab74 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -16,7 +16,9 @@ 
 #include "internals.h"
 #include "fpu/softfloat-helpers.h"
 #include "cpu-csr.h"
+#ifndef CONFIG_USER_ONLY
 #include "sysemu/reset.h"
+#endif
 
 const char * const regnames[32] = {
     "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",