[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/26] target/i386: Check for USER_ONLY definition instead of SOFT
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 04/26] target/i386: Check for USER_ONLY definition instead of SOFTMMU one |
|
Date: |
Fri, 6 Oct 2023 13:13:50 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Since we *might* have user emulation with softmmu,
replace the system emulation check by !user emulation one.
(target/ was cleaned from invalid CONFIG_SOFTMMU uses at
commit cab35c73be, but these files were merged few days
after, thus missed the cleanup.)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231004082239.27251-1-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 2 +-
target/i386/tcg/misc_helper.c | 2 +-
target/i386/tcg/translate.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 5b620500abf..3bcf7a3f904 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -719,7 +719,7 @@ void x86_cpu_vendor_words2str(char *dst, uint32_t vendor1,
CPUID_7_0_EBX_HLE
CPUID_7_0_EBX_INVPCID, CPUID_7_0_EBX_RTM */
-#if defined CONFIG_SOFTMMU || defined CONFIG_LINUX
+#if !defined CONFIG_USER_ONLY || defined CONFIG_LINUX
#define TCG_7_0_ECX_RDPID CPUID_7_0_ECX_RDPID
#else
#define TCG_7_0_ECX_RDPID 0
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index 868f36ab7f5..babff061864 100644
--- a/target/i386/tcg/misc_helper.c
+++ b/target/i386/tcg/misc_helper.c
@@ -134,7 +134,7 @@ void helper_wrpkru(CPUX86State *env, uint32_t ecx, uint64_t
val)
target_ulong HELPER(rdpid)(CPUX86State *env)
{
-#if defined CONFIG_SOFTMMU
+#if !defined CONFIG_USER_ONLY
return env->tsc_aux;
#elif defined CONFIG_LINUX && defined CONFIG_GETCPU
unsigned cpu, node;
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 72635b87d3c..aa4cdf45b4b 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -178,10 +178,10 @@ typedef struct DisasContext {
#else
#define CODE64(S) (((S)->flags & HF_CS64_MASK) != 0)
#endif
-#if defined(CONFIG_SOFTMMU) && !defined(TARGET_X86_64)
-#define LMA(S) false
-#else
+#if defined(CONFIG_USER_ONLY) || defined(TARGET_X86_64)
#define LMA(S) (((S)->flags & HF_LMA_MASK) != 0)
+#else
+#define LMA(S) false
#endif
#ifdef TARGET_X86_64
--
2.41.0
- [PULL 00/26] Audio, source reorg, HVF changes for 2023-10-06, Paolo Bonzini, 2023/10/06
- [PULL 01/26] target/i386/hvf: Remove unused includes in 'hvf-i386.h', Paolo Bonzini, 2023/10/06
- [PULL 04/26] target/i386: Check for USER_ONLY definition instead of SOFTMMU one,
Paolo Bonzini <=
- [PULL 05/26] softmmu/trace-events: Fix a typo, Paolo Bonzini, 2023/10/06
- [PULL 08/26] fuzz: Correct invalid mentions of 'softmmu' by 'system', Paolo Bonzini, 2023/10/06
- [PULL 03/26] util/log: re-allow switching away from stderr log file, Paolo Bonzini, 2023/10/06
- [PULL 02/26] sysemu/kvm: Restrict hvf_get_supported_cpuid() to x86 targets, Paolo Bonzini, 2023/10/06
- [PULL 09/26] tcg: Correct invalid mentions of 'softmmu' by 'system-mode', Paolo Bonzini, 2023/10/06
- [PULL 10/26] accel: Rename accel_softmmu* -> accel_system*, Paolo Bonzini, 2023/10/06
- [PULL 12/26] semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user(), Paolo Bonzini, 2023/10/06
- [PULL 07/26] cpu: Correct invalid mentions of 'softmmu' by 'system-mode', Paolo Bonzini, 2023/10/06
- [PULL 16/26] meson: Rename target_softmmu_arch -> target_system_arch, Paolo Bonzini, 2023/10/06
- [PULL 11/26] gdbstub: Rename 'softmmu' -> 'system', Paolo Bonzini, 2023/10/06