On 9/17/18 6:30 PM, Emilio G. Cota wrote: > From: Paolo Bonzini <pbonz...@redhat.com> > > It will be changed to an atomic operation soon. > > Cc: Peter Crosthwaite <crosthwaite.pe...@gmail.com> > Cc: Richard Henderson <r...@twiddle.net> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Emilio G. Cota <c...@braap.org>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > accel/tcg/cpu-exec.c | 6 +++--- > exec.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c > index 6bcb6d99bd..7ca00725ec 100644 > --- a/accel/tcg/cpu-exec.c > +++ b/accel/tcg/cpu-exec.c > @@ -533,7 +533,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, > interrupt_request &= ~CPU_INTERRUPT_SSTEP_MASK; > } > if (interrupt_request & CPU_INTERRUPT_DEBUG) { > - cpu->interrupt_request &= ~CPU_INTERRUPT_DEBUG; > + cpu_reset_interrupt(cpu, CPU_INTERRUPT_DEBUG); > cpu->exception_index = EXCP_DEBUG; > qemu_mutex_unlock_iothread(); > return true; > @@ -542,7 +542,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, > /* Do nothing */ > } else if (interrupt_request & CPU_INTERRUPT_HALT) { > replay_interrupt(); > - cpu->interrupt_request &= ~CPU_INTERRUPT_HALT; > + cpu_reset_interrupt(cpu, CPU_INTERRUPT_HALT); > cpu->halted = 1; > cpu->exception_index = EXCP_HLT; > qemu_mutex_unlock_iothread(); > @@ -582,7 +582,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, > interrupt_request = cpu->interrupt_request; > } > if (interrupt_request & CPU_INTERRUPT_EXITTB) { > - cpu->interrupt_request &= ~CPU_INTERRUPT_EXITTB; > + cpu_reset_interrupt(cpu, CPU_INTERRUPT_EXITTB); > /* ensure that no TB jump will be modified as > the program flow was changed */ > *last_tb = NULL; > diff --git a/exec.c b/exec.c > index 6826c8337d..0b8e2420cf 100644 > --- a/exec.c > +++ b/exec.c > @@ -776,7 +776,7 @@ static int cpu_common_post_load(void *opaque, int > version_id) > > /* 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the > version_id is increased. */ > - cpu->interrupt_request &= ~0x01; > + cpu_reset_interrupt(cpu, 0x01); > tlb_flush(cpu); > > /* loadvm has just updated the content of RAM, bypassing the >