[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/pvh: set only minimal cr0 and cr4 flags in order to use paging
commit 51e2cac257ec8b4080d89f0855c498cbbd76a5e5 Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Tue Nov 26 09:52:47 2013 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Nov 26 09:52:47 2013 +0100 x86/pvh: set only minimal cr0 and cr4 flags in order to use paging Right now Xen sets the WP and NE flags on cr0 for PVH, which are not needed in order to boot with paging enabled. The same happens with cr4, at least on my system OSFXSR, OSXMMEXCPT and MCE are enabled by default when there's no need. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Acked-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> Acked-by: Eddie Dong <eddie.dong@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmcs.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 4aab971..44f33cb 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -28,7 +28,6 @@ #include <asm/msr.h> #include <asm/xstate.h> #include <asm/hvm/hvm.h> -#include <asm/hvm/nestedhvm.h> #include <asm/hvm/io.h> #include <asm/hvm/support.h> #include <asm/hvm/vmx/vmx.h> @@ -1090,13 +1089,11 @@ static int construct_vmcs(struct vcpu *v) /* PVH domains always start in paging mode */ if ( is_pvh_domain(d) ) - v->arch.hvm_vcpu.guest_cr[0] |= X86_CR0_PG | X86_CR0_NE | X86_CR0_WP; + v->arch.hvm_vcpu.guest_cr[0] |= X86_CR0_PG; hvm_update_guest_cr(v, 0); - v->arch.hvm_vcpu.guest_cr[4] = is_pvh_domain(d) ? - (real_cr4_to_pv_guest_cr4(mmu_cr4_features) - & ~HVM_CR4_GUEST_RESERVED_BITS(v)) : 0; + v->arch.hvm_vcpu.guest_cr[4] = is_pvh_domain(d) ? X86_CR4_PAE : 0; hvm_update_guest_cr(v, 4); if ( cpu_has_vmx_tpr_shadow ) -- 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 |