summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper.c10
-rw-r--r--target-i386/translate.c2
2 files changed, 9 insertions, 3 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 40dc41f3a7..91fd6a96c7 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -4120,8 +4120,9 @@ void helper_vmrun(target_ulong addr)
if (loglevel & CPU_LOG_TB_IN_ASM)
fprintf(logfile, " %#x %#x\n", env->exception_index, env->error_code);
}
- if (int_ctl & V_IRQ_MASK)
+ if ((int_ctl & V_IRQ_MASK) || (env->intercept & INTERCEPT_VINTR)) {
env->interrupt_request |= CPU_INTERRUPT_VIRQ;
+ }
cpu_loop_exit();
}
@@ -4283,6 +4284,13 @@ void vmexit(uint64_t exit_code, uint64_t exit_info_1)
ldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2)),
EIP);
+ if(env->hflags & HF_INHIBIT_IRQ_MASK) {
+ stl_phys(env->vm_vmcb + offsetof(struct vmcb, control.int_state), SVM_INTERRUPT_SHADOW_MASK);
+ env->hflags &= ~HF_INHIBIT_IRQ_MASK;
+ } else {
+ stl_phys(env->vm_vmcb + offsetof(struct vmcb, control.int_state), 0);
+ }
+
/* Save the VM state in the vmcb */
SVM_SAVE_SEG(env->vm_vmcb, segs[R_ES], es);
SVM_SAVE_SEG(env->vm_vmcb, segs[R_CS], cs);
diff --git a/target-i386/translate.c b/target-i386/translate.c
index d62d563bd9..cd9541265a 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -5551,8 +5551,6 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
gen_op_set_inhibit_irq();
/* give a chance to handle pending irqs */
gen_jmp_im(s->pc - s->cs_base);
- if (gen_svm_check_intercept(s, pc_start, SVM_EXIT_VINTR))
- break;
gen_eob(s);
} else {
gen_exception(s, EXCP0D_GPF, pc_start - s->cs_base);