diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2015-08-05 12:04:21 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-08-05 12:47:23 +0200 |
commit | a0a64f50aac731d42125dd8581b9a31e4fdb0f75 (patch) | |
tree | 9ee6a764be428e7ac51f33cae8b718347df804b5 /arch/x86/kvm/x86.c | |
parent | d2b0f98125425c72a3f628fbe5498eb55329738b (diff) |
KVM: MMU: introduce rsvd_bits_validate
These two fields, rsvd_bits_mask and bad_mt_xwr, in "struct kvm_mmu" are
used to check if reserved bits set on guest ptes, move them to a data
struct so that the approach can be applied to check host shadow page
table entries as well
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 23e47a0b054b..c7b6aed998e9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -525,7 +525,8 @@ int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3) } for (i = 0; i < ARRAY_SIZE(pdpte); ++i) { if (is_present_gpte(pdpte[i]) && - (pdpte[i] & vcpu->arch.mmu.rsvd_bits_mask[0][2])) { + (pdpte[i] & + vcpu->arch.mmu.guest_rsvd_check.rsvd_bits_mask[0][2])) { ret = 0; goto out; } |