KVM: x86/mmu: Add sptep_to_sp() helper to wrap shadow page lookup
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 22 Jun 2020 20:20:33 +0000 (13:20 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jul 2020 20:21:55 +0000 (16:21 -0400)
commit573546820b792ef620acbfaa16bdf24ffbb1007b
tree1d15a92ce16a9e266719d6ae8dc876ec6a2b6fa9
parent985ab2780164698ec6e7d73fad523d50449261dd
KVM: x86/mmu: Add sptep_to_sp() helper to wrap shadow page lookup

Introduce sptep_to_sp() to reduce the boilerplate code needed to get the
shadow page associated with a spte pointer, and to improve readability
as it's not immediately obvious that "page_header" is a KVM-specific
accessor for retrieving a shadow page.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200622202034.15093-6-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/mmu_audit.c
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/paging_tmpl.h