From: Tim Deegan Subject: [PATCH] Fix #GPF injection into compat guests in vm86 code Date: Wed, 30 Jun 2010 16:29:27 +0100 Message-ID: <20100630152927.GI31695@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 diff -r eae66d92cee1 xen/arch/x86/x86_64/compat/traps.c --- a/xen/arch/x86/x86_64/compat/traps.c Wed Mar 24 15:26:57 2010 +0000 +++ b/xen/arch/x86/x86_64/compat/traps.c Wed Mar 24 15:54:23 2010 +0000 @@ -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;