]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Clear MMU-writable during changed_pte notifier
authorDavid Matlack <dmatlack@google.com>
Thu, 13 Jan 2022 23:30:18 +0000 (23:30 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Jan 2022 17:06:45 +0000 (12:06 -0500)
commit868388c7cf13ee4c744dd306c7f8305f85b6b1f5
tree47d1a8868b92411e5a065c83054932bb4ab3bbd7
parent8ca5bc69cdcdb367517ce802f9040bbdb5a0ad84
KVM: x86/mmu: Clear MMU-writable during changed_pte notifier

When handling the changed_pte notifier and the new PTE is read-only,
clear both the Host-writable and MMU-writable bits in the SPTE. This
preserves the invariant that MMU-writable is set if-and-only-if
Host-writable is set.

No functional change intended. Nothing currently relies on the
aforementioned invariant and technically the changed_pte notifier is
dead code.

Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220113233020.3986005-3-dmatlack@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/spte.c