]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Reinitialize context if host userspace toggles EFER.LME
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Feb 2022 09:56:05 +0000 (04:56 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:15 +0000 (08:20 -0500)
commit2c142fe41e25ddb32e013e718d0c7a2a2b39959d
treea97f8e14dd4c248e9ab8b645e8d12d8602778e07
parent1b1d80f2dbd10bb57c1260529de586fcfedd5f18
KVM: x86: Reinitialize context if host userspace toggles EFER.LME

While the guest runs, EFER.LME cannot change unless CR0.PG is clear, and
therefore EFER.NX is the only bit that can affect the MMU role.  However,
set_efer accepts a host-initiated change to EFER.LME even with CR0.PG=1.
In that case, the MMU has to be reset.

Fixes: 24bbbdc3c1b7 ("KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes")
Cc: stable@vger.kernel.org
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/x86.c