qemu-devel
[Top][All Lists]
Advanced

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

[RFC PATCH v2 2/9] target/i386: Check for USER_ONLY definition instead o


From: Philippe Mathieu-Daudé
Subject: [RFC PATCH v2 2/9] target/i386: Check for USER_ONLY definition instead of SOFTMMU one
Date: Tue, 6 Jun 2023 00:24:13 +0200

Since we *might* have user emulation with softmmu,
replace the system emulation check by !user emulation one.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/i386/tcg/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 5cf14311a6..750253e679 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -6915,7 +6915,7 @@ static void i386_tr_init_disas_context(DisasContextBase 
*dcbase, CPUState *cpu)
     dc->popl_esp_hack = 0;
     /* select memory access functions */
     dc->mem_index = 0;
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
     dc->mem_index = cpu_mmu_index(env, false);
 #endif
     dc->cpuid_features = env->features[FEAT_1_EDX];
-- 
2.38.1




reply via email to

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