]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Add helpers to do full reserved SPTE checks w/ generic MMU
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:32 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:46 +0000 (18:00 -0400)
commitc74e4afe7c61d8e8285a96e0119376452d6d2d1e
tree9b7e5e395eb6f3e55f8dec78800137959a3f9025
parenta1d0a86bb4880b2530cbf86b54bbf8ed31d0077e
KVM: x86/mmu: Add helpers to do full reserved SPTE checks w/ generic MMU

Extract the reserved SPTE check and print helpers in get_mmio_spte() to
new helpers so that KVM can also WARN on reserved badness when making a
SPTE.

Tag the checking helper with __always_inline to improve the probability
of the compiler generating optimal code for the checking loop, e.g. gcc
appears to avoid using %rbp when the helper is tagged with a vanilla
"inline".

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-48-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/spte.h