]> git.proxmox.com Git - mirror_qemu.git/commitdiff
replay: improve interrupt handling
authorPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Tue, 24 Jan 2017 07:17:08 +0000 (10:17 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Jan 2017 17:07:30 +0000 (18:07 +0100)
This patch improves interrupt handling in record/replay mode.
Now "interrupt" event is saved only when cc->cpu_exec_interrupt returns true.
This patch also adds missing return to cpu_exec_interrupt function.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20170124071708.4572.64023.stgit@PASHA-ISP>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpu-exec.c
target/i386/seg_helper.c

index 4188fed3c62c66545f515cb41401441360164588..fa08c733daf10effc8929f81fed7c353ad817619 100644 (file)
@@ -508,8 +508,8 @@ static inline void cpu_handle_interrupt(CPUState *cpu,
            True when it is, and we should restart on a new TB,
            and via longjmp via cpu_loop_exit.  */
         else {
-            replay_interrupt();
             if (cc->cpu_exec_interrupt(cpu, interrupt_request)) {
+                replay_interrupt();
                 *last_tb = NULL;
             }
             /* The target hook may have updated the 'cpu->interrupt_request';
index fb79f3180d1a2e0ac9e95782660e9e7e5cd88fba..d24574da7f6a69582033b396465b44ec110ef499 100644 (file)
@@ -1331,6 +1331,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
 #endif
     if (interrupt_request & CPU_INTERRUPT_SIPI) {
         do_cpu_sipi(cpu);
+        ret = true;
     } else if (env->hflags2 & HF2_GIF_MASK) {
         if ((interrupt_request & CPU_INTERRUPT_SMI) &&
             !(env->hflags & HF_SMM_MASK)) {