Skip to content

Commit

Permalink
KVM: Don't reset mmu context unnecessarily when updating EFER
Browse files Browse the repository at this point in the history
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 <avi@redhat.com>
  • Loading branch information
avikivity committed Jan 2, 2011
1 parent d0dfc6b commit 010c520
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 010c520

Please sign in to comment.