summary refs log tree commit diff stats
path: root/include/hw/core/cpu.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-06-13 15:33:43 +0200
committerRichard Henderson <richard.henderson@linaro.org>2023-06-20 10:01:30 +0200
commit75fe97b429d491d348fde78ec75c6556762b4b87 (patch)
treea1672418be5fb117594b39b14b1adf9b42598ef6 /include/hw/core/cpu.h
parent227776b7e2768f9912cfcb6def4c740471cd2170 (diff)
downloadfocaccia-qemu-75fe97b429d491d348fde78ec75c6556762b4b87.tar.gz
focaccia-qemu-75fe97b429d491d348fde78ec75c6556762b4b87.zip
hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one
Since we *might* have user emulation with softmmu,
replace the system emulation check by !user emulation one.

Invert the #ifdef'ry in TCGCPUOps structure for clarity.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230613133347.82210-6-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/core/cpu.h')
-rw-r--r--include/hw/core/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index d84fbccaab..4871ad85f0 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1016,7 +1016,7 @@ void page_size_init(void);
 
 #ifdef NEED_CPU_H
 
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
 
 extern const VMStateDescription vmstate_cpu_common;
 
@@ -1027,7 +1027,7 @@ extern const VMStateDescription vmstate_cpu_common;
     .flags = VMS_STRUCT,                                                    \
     .offset = 0,                                                            \
 }
-#endif /* CONFIG_SOFTMMU */
+#endif /* !CONFIG_USER_ONLY */
 
 #endif /* NEED_CPU_H */