Message ID | 20240428221450.26460-4-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | exec: Rework around CPUState user fields (part 2) | expand |
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > accel/tcg/translate-all.c | 9 --------- > accel/tcg/user-exec.c | 8 ++++++++ > 2 files changed, 8 insertions(+), 9 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~ > > diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c > index 83cc14fbde..fdf6d8ac19 100644 > --- a/accel/tcg/translate-all.c > +++ b/accel/tcg/translate-all.c > @@ -644,15 +644,6 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) > cpu_loop_exit_noexc(cpu); > } > > -#else /* CONFIG_USER_ONLY */ > - > -void cpu_interrupt(CPUState *cpu, int mask) > -{ > - g_assert(bql_locked()); > - cpu->interrupt_request |= mask; > - qatomic_set(&cpu->neg.icount_decr.u16.high, -1); > -} > - > #endif /* CONFIG_USER_ONLY */ > > /* > diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c > index ca27746fe4..f49435df9d 100644 > --- a/accel/tcg/user-exec.c > +++ b/accel/tcg/user-exec.c > @@ -24,6 +24,7 @@ > #include "qemu/bitops.h" > #include "qemu/rcu.h" > #include "exec/cpu_ldst.h" > +#include "qemu/main-loop.h" > #include "exec/translate-all.h" > #include "exec/page-protection.h" > #include "exec/helper-proto.h" > @@ -38,6 +39,13 @@ __thread uintptr_t helper_retaddr; > > //#define DEBUG_SIGNAL > > +void cpu_interrupt(CPUState *cpu, int mask) > +{ > + g_assert(bql_locked()); > + cpu->interrupt_request |= mask; > + qatomic_set(&cpu->neg.icount_decr.u16.high, -1); > +} > + > /* > * Adjust the pc to pass to cpu_restore_state; return the memop type. > */
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 83cc14fbde..fdf6d8ac19 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -644,15 +644,6 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) cpu_loop_exit_noexc(cpu); } -#else /* CONFIG_USER_ONLY */ - -void cpu_interrupt(CPUState *cpu, int mask) -{ - g_assert(bql_locked()); - cpu->interrupt_request |= mask; - qatomic_set(&cpu->neg.icount_decr.u16.high, -1); -} - #endif /* CONFIG_USER_ONLY */ /* diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index ca27746fe4..f49435df9d 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -24,6 +24,7 @@ #include "qemu/bitops.h" #include "qemu/rcu.h" #include "exec/cpu_ldst.h" +#include "qemu/main-loop.h" #include "exec/translate-all.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" @@ -38,6 +39,13 @@ __thread uintptr_t helper_retaddr; //#define DEBUG_SIGNAL +void cpu_interrupt(CPUState *cpu, int mask) +{ + g_assert(bql_locked()); + cpu->interrupt_request |= mask; + qatomic_set(&cpu->neg.icount_decr.u16.high, -1); +} + /* * Adjust the pc to pass to cpu_restore_state; return the memop type. */
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/tcg/translate-all.c | 9 --------- accel/tcg/user-exec.c | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-)