diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-06-30 18:24:55 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-06-30 18:24:55 +0100 |
commit | 072f86df7a26db9388bfc1183a138b1326e23eee (patch) | |
tree | 0e87f12b2b3c34863c707642d8c03175f337de25 | |
parent | 7810f62290b9f41a4d4296c58d22dc69900dacd5 (diff) | |
download | xen-072f86df7a26db9388bfc1183a138b1326e23eee.tar.gz xen-072f86df7a26db9388bfc1183a138b1326e23eee.tar.bz2 xen-072f86df7a26db9388bfc1183a138b1326e23eee.zip |
Fix #GPF injection into compat guests in vm86 code
not to let the guest disable interrupts in the real EFLAGS.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com
xen-unstable changeset: 21700:fae04060a4f4
xen-unstable date: Wed Jun 30 18:12:43 2010 +0100
-rw-r--r-- | xen/arch/x86/x86_64/compat/traps.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c index 69014383c7..a9ee983a90 100644 --- a/xen/arch/x86/x86_64/compat/traps.c +++ b/xen/arch/x86/x86_64/compat/traps.c @@ -127,9 +127,8 @@ unsigned int compat_iret(void) 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; |