]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Don't treat fully writable SPTEs as volatile (modulo A/D)
authorSean Christopherson <seanjc@google.com>
Sat, 23 Apr 2022 03:47:41 +0000 (03:47 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 May 2022 11:22:31 +0000 (07:22 -0400)
commit0885412e6a3929ff43db88aeaa9f777b6100aa6c
tree92e3fdad361f2eb97c0fe60197738b3f2be02f91
parent0a9712ededd47fa3404c3729a8b9595aadf06973
KVM: x86/mmu: Don't treat fully writable SPTEs as volatile (modulo A/D)

Don't treat SPTEs that are truly writable, i.e. writable in hardware, as
being volatile (unless they're volatile for other reasons, e.g. A/D bits).
KVM _sets_ the WRITABLE bit out of mmu_lock, but never _clears_ the bit
out of mmu_lock, so if the WRITABLE bit is set, it cannot magically get
cleared just because the SPTE is MMU-writable.

Rename the wrapper of MMU-writable to be more literal, the previous name
of spte_can_locklessly_be_made_writable() is wrong and misleading.

Fixes: eb4077a60026 ("KVM: MMU: fast path of handling guest page fault")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220423034752.1161007-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/spte.h