aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2015-09-17 19:23:31 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-25 12:04:44 +0200
commit6220e900bcdc524a175b2d2e725ebb9bb11a0008 (patch)
treeb2b6eddb59b5ada0b96130b65e81cc37c71a9d05 /cpu-exec.c
parent4ecd4d16a0af714ff7d9a1ad2559c621bf27649f (diff)
i386: partial revert of interrupt poll fix
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions break the determinism of cpu_exec. This patch is required to make interrupts processing deterministic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162331.8676.15286.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 947e646ae4..8fd56a69e0 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -27,6 +27,9 @@
#include "exec/address-spaces.h"
#include "qemu/rcu.h"
#include "exec/tb-hash.h"
+#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
+#include "hw/i386/apic.h"
+#endif
/* -icount align implementation. */
@@ -343,6 +346,12 @@ int cpu_exec(CPUState *cpu)
SyncClocks sc;
if (cpu->halted) {
+#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
+ if (cpu->interrupt_request & CPU_INTERRUPT_POLL) {
+ apic_poll_irq(x86_cpu->apic_state);
+ cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL);
+ }
+#endif
if (!cpu_has_work(cpu)) {
return EXCP_HALTED;
}