[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/pvh: do not allow 32-bit PVH guests to clear CR4's PAE bit
commit 476cf36ac0de41bd5070f902c430d5ce90c7f590 Author: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> AuthorDate: Wed Sep 9 17:08:56 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Sep 9 17:08:56 2015 +0200 x86/pvh: do not allow 32-bit PVH guests to clear CR4's PAE bit .. since we only support 32-bit PV(H) guests in PAE mode. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index a38c302..c6d2e59 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3522,11 +3522,19 @@ int hvm_set_cr4(unsigned long value, bool_t may_defer) goto gpf; } - if ( !(value & X86_CR4_PAE) && hvm_long_mode_enabled(v) ) + if ( !(value & X86_CR4_PAE) ) { - HVM_DBG_LOG(DBG_LEVEL_1, "Guest cleared CR4.PAE while " - "EFER.LMA is set"); - goto gpf; + if ( hvm_long_mode_enabled(v) ) + { + HVM_DBG_LOG(DBG_LEVEL_1, "Guest cleared CR4.PAE while " + "EFER.LMA is set"); + goto gpf; + } + if ( is_pvh_vcpu(v) ) + { + HVM_DBG_LOG(DBG_LEVEL_1, "32-bit PVH guest cleared CR4.PAE"); + goto gpf; + } } old_cr = v->arch.hvm_vcpu.guest_cr[4]; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |