qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/35] exec: use cpu_reset_interrupt


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 06/35] exec: use cpu_reset_interrupt
Date: Wed, 19 Sep 2018 22:59:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/17/18 6:30 PM, Emilio G. Cota wrote:
> From: Paolo Bonzini <address@hidden>
> 
> It will be changed to an atomic operation soon.
> 
> Cc: Peter Crosthwaite <address@hidden>
> Cc: Richard Henderson <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Emilio G. Cota <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  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
> 



reply via email to

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