KVM: x86/mmu: Move is_writable_pte() to spte.h
authorDavid Matlack <dmatlack@google.com>
Tue, 25 Jan 2022 23:05:16 +0000 (23:05 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 18:50:32 +0000 (13:50 -0500)
commit006100212d7f1d608a97af37bf218d87afb80db6
treecc9ea47cee2605445ab0a96613e22d9a3aa0db44
parent115111efd97c6c0e86f8b5904c6624fddcfe4f34
KVM: x86/mmu: Move is_writable_pte() to spte.h

Move is_writable_pte() close to the other functions that check
writability information about SPTEs. While here opportunistically
replace the open-coded bit arithmetic in
check_spte_writable_invariants() with a call to is_writable_pte().

No functional change intended.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220125230518.1697048-4-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/mmu/spte.h