aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 05:29:14 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:39 -0500
commitce03e4f21a33b97c5d20ce597f64c361bb247904 (patch)
tree156623c2acf64f160855ce24cdd9cc5106a4ce21
parent4c38609ac569483152f9cb7e5a66f17355e563b2 (diff)
KVM: VMX: When using ept, allow the guest to own cr4.pge
We make no use of cr4.pge if ept is enabled, but the guest does (to flush global mappings, as with vmap()), so give the guest ownership of this bit. Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 755811a564b3..a7ebaa5f2b65 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2424,6 +2424,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
2424 2424
2425 vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL); 2425 vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL);
2426 vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS; 2426 vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS;
2427 if (enable_ept)
2428 vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE;
2427 vmcs_writel(CR4_GUEST_HOST_MASK, ~vmx->vcpu.arch.cr4_guest_owned_bits); 2429 vmcs_writel(CR4_GUEST_HOST_MASK, ~vmx->vcpu.arch.cr4_guest_owned_bits);
2428 2430
2429 tsc_base = vmx->vcpu.kvm->arch.vm_init_tsc; 2431 tsc_base = vmx->vcpu.kvm->arch.vm_init_tsc;