]> 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)
commita1da4477e61fd89082ae80168ceba7c4282635d4
tree47d1a8868b92411e5a065c83054932bb4ab3bbd7
parentb3975598add046be9f58eba1312d9b15ba805f02
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