KVM: x86/mmu: Move SPTE writable invariant checks to a helper function
authorDavid Matlack <dmatlack@google.com>
Tue, 25 Jan 2022 23:05:14 +0000 (23:05 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 18:50:31 +0000 (13:50 -0500)
commit932859a4e0b9fa12ba315e88e3d29f9d2f638916
tree22ffff3faec1ec1be8e9ffaa1f53fdf25856e450
parent1714a4eb6fb0cb79f182873cd011a8ed60ac65e8
KVM: x86/mmu: Move SPTE writable invariant checks to a helper function

Move the WARNs in spte_can_locklessly_be_made_writable() to a separate
helper function. This is in preparation for moving these checks to the
places where SPTEs are set.

Opportunistically add warning error messages that include the SPTE to
make future debugging of these warnings easier.

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