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/include | |
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/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 2f9e504f9f0c..847b37cbf211 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -252,6 +252,11 @@ struct kvm_pio_request { int size; }; +struct rsvd_bits_validate { + u64 rsvd_bits_mask[2][4]; + u64 bad_mt_xwr; +}; + /* * x86 supports 3 paging modes (4-level 64-bit, 3-level 64-bit, and 2-level * 32-bit). The kvm_mmu structure abstracts the details of the current mmu @@ -289,8 +294,7 @@ struct kvm_mmu { u64 *pae_root; u64 *lm_root; - u64 rsvd_bits_mask[2][4]; - u64 bad_mt_xwr; + struct rsvd_bits_validate guest_rsvd_check; /* * Bitmap: bit set = last pte in walk |