[PATCH-for-9.0] accel: Do not set CPUState::tcg_cflags in non-TCG accels

Philippe Mathieu-Daudé posted 1 patch 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231130075958.21285-1-philmd@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
target/arm/cpu.c  | 2 +-
target/i386/cpu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH-for-9.0] accel: Do not set CPUState::tcg_cflags in non-TCG accels
Posted by Philippe Mathieu-Daudé 12 months ago
'tcg_cflags' is specific to TCG.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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(-)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 25e9d2ae7b..098e964644 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -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
 
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index cd16cb893d..dfb96217ad 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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
 
-- 
2.41.0


Re: [PATCH-for-9.0] accel: Do not set CPUState::tcg_cflags in non-TCG accels
Posted by Richard Henderson 12 months ago
On 11/30/23 01:59, Philippe Mathieu-Daudé wrote:
> 'tcg_cflags' is specific to TCG.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Other targets already use it restricted to TCG, or are TCG-only.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~