Fix #GPF injection into compat guests in vm86 code
PATCH 1/1 Fix #GPF injection into compat guests in vm86 code
Fix #GPF injection into compat guests in vm86 code not to let the guest disable interrupts in the real EFLAGS.
This should be applied to all stable branches too, please.
Signed-off-by Ian Campbell <[email protected]>
xen/arch/x86/x86_64/compat/traps.c +2 -3
@@ -101,9 +101,8 @@ ti = &v->arch.guest_context.trap_ctxt[13 ];if (TI_GET_IF (ti) ) eflags &= ~X86_EFLAGS_IF ; - regs->_eflags = eflags & ~(X86_EFLAGS_VM |X86_EFLAGS_RF | -X86_EFLAGS_NT |X86_EFLAGS_TF ); - + regs->_eflags &= ~(X86_EFLAGS_VM |X86_EFLAGS_RF | +X86_EFLAGS_NT |X86_EFLAGS_TF );if (unlikely (__put_user (0 , (u32 *)regs->rsp)) ) goto exit_and_crash; regs->_eip = ti->address;