diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2015-08-05 12:04:24 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-08-05 12:47:24 +0200 |
commit | c258b62b264fdc469b6d3610a907708068145e3b (patch) | |
tree | 57c870353bbb93da102e8e26deb7128357523280 /arch/x86/kvm/mmu.h | |
parent | 81b8eebbc3511bfa21520314b07988a875a4d066 (diff) |
KVM: MMU: introduce the framework to check zero bits on sptes
We have abstracted the data struct and functions which are used to check
reserved bit on guest page tables, now we extend the logic to check
zero bits on shadow page tables
The zero bits on sptes include not only reserved bits on hardware but also
the bits that SPTEs willnever use. For example, shadow pages will never
use GB pages unless the guest uses them too.
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.h')
-rw-r--r-- | arch/x86/kvm/mmu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h index 398d21c0f6dd..2299d15c91dc 100644 --- a/arch/x86/kvm/mmu.h +++ b/arch/x86/kvm/mmu.h @@ -53,6 +53,9 @@ static inline u64 rsvd_bits(int s, int e) int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4]); void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask); +void +reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context); + /* * Return values of handle_mmio_page_fault_common: * RET_MMIO_PF_EMULATE: it is a real mmio page fault, emulate the instruction |