@@ -4971,6 +4997,15 @@ void helper_vmrun(int aflag, int next_eip_addend)
env->dr[6] = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr6));
cpu_x86_set_cpl(env, ldub_phys(env->vm_vmcb + offsetof(struct vmcb, save.cpl)));
+ {
+ uint32_t aaa;
+ aaa = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, control.int_state));
+ if (aaa & SVM_INTERRUPT_SHADOW_MASK)
+ helper_set_inhibit_irq();
+ else
+ helper_reset_inhibit_irq();
+ }
+
/* FIXME: guest state consistency checks */
switch(ldub_phys(env->vm_vmcb + offsetof(struct vmcb, control.tlb_ctl))) {
@@ -5243,7 +5280,6 @@ void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1)
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);
}