From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH 05/12] Nested Virtualization: CRn & paged real mode Date: Mon, 20 Dec 2010 17:05:37 +0100 Message-ID: <201012201705.37435.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_R73DNKLAJf7wuat" Return-path: 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 --Boundary-00=_R73DNKLAJf7wuat Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_R73DNKLAJf7wuat Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_nh05_cr.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_nh05_cr.diff" Content-Description: xen_nh05_cr.diff # HG changeset patch # User cegger # Date 1292839434 -3600 Allow paged real mode during vmrun emulation. Emulate cr0 and cr4 when guest does not intercept them. Signed-off-by: Christoph Egger diff -r a9465de5a794 -r 6e4fc6e272a7 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -1255,7 +1256,8 @@ int hvm_set_cr0(unsigned long value) /* ET is reserved and should be always be 1. */ value |= X86_CR0_ET; - if ( (value & (X86_CR0_PE | X86_CR0_PG)) == X86_CR0_PG ) + if ( !nestedhvm_vmswitch_in_progress(v) && + (value & (X86_CR0_PE | X86_CR0_PG)) == X86_CR0_PG ) goto gpf; if ( (value & X86_CR0_PG) && !(old_value & X86_CR0_PG) ) --Boundary-00=_R73DNKLAJf7wuat Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_R73DNKLAJf7wuat--