Skip to content

Commit 010c520

Browse files
committed
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 <[email protected]>
1 parent d0dfc6b commit 010c520

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/x86/kvm/x86.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer)
830830
kvm_x86_ops->set_efer(vcpu, efer);
831831

832832
vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled;
833-
kvm_mmu_reset_context(vcpu);
834833

835834
/* Update reserved bits */
836835
if ((efer ^ old_efer) & EFER_NX)

0 commit comments

Comments
 (0)