From: Avi Kivity Date: Mon, 11 Oct 2010 12:23:39 +0000 (+0200) Subject: KVM: Don't reset mmu context unnecessarily when updating EFER X-Git-Tag: v2.6.38-rc1~244^2~141 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=010c520e20413dfd567d568aba2b7238acd37e33;p=~andy%2Flinux KVM: Don't reset mmu context unnecessarily when updating EFER The only bit of EFER that affects the mmu is NX, and this is already accounted for (LME only takes effect when changing cr0). Based on a patch by Hillf Danton. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b989e1f1e5d..c05d4770129 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -830,7 +830,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer) kvm_x86_ops->set_efer(vcpu, efer); vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; - kvm_mmu_reset_context(vcpu); /* Update reserved bits */ if ((efer ^ old_efer) & EFER_NX)