Skip to contentSkip to conversation

accel: Do not set CPUState::tcg_cflags in non-TCG accels

PATCH-for-9.0 Philippe Mathieu-Daudé 2 participants 2 messages Nov 30, 2023

lore
Share & tools
lore
#0 lore raw

'tcg_cflags' is specific to TCG.

---
Other targets already use it restricted to TCG, or are TCG-only.

---
 target/arm/cpu.c  | 2 +-
 target/i386/cpu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
target/arm/cpu.c +1 -1
index 25e9d2ae7b..098e964644 100644
@@ -1781,8 +1781,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
     int pagebits;
     Error *local_err = NULL;
 
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
     /* Use pc-relative instructions in system-mode */
-#ifndef CONFIG_USER_ONLY
     cs->tcg_cflags |= CF_PCREL;
 #endif
 
target/i386/cpu.c +1 -1
index cd16cb893d..dfb96217ad 100644
@@ -7222,8 +7222,8 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
     static bool ht_warned;
     unsigned requested_lbr_fmt;
 
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
     /* Use pc-relative instructions in system-mode */
-#ifndef CONFIG_USER_ONLY
     cs->tcg_cflags |= CF_PCREL;
 #endif
 
Signature · 1 line
2.41.0