diff options
author | Junaid Shahid <junaids@google.com> | 2016-12-06 16:46:15 -0800 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-01-09 14:46:10 +0100 |
commit | 37f0e8fe6b10ee2ab52576caa721ee1282de74a6 (patch) | |
tree | 586978d589093bfb1bbd2200f64b3e51d1c66402 /arch/x86/include/asm/kvm_host.h | |
parent | f39a058d0ea2f58b9c69cfcf7c93184f33302c98 (diff) | |
download | linux-37f0e8fe6b10ee2ab52576caa721ee1282de74a6.tar.gz linux-37f0e8fe6b10ee2ab52576caa721ee1282de74a6.tar.bz2 linux-37f0e8fe6b10ee2ab52576caa721ee1282de74a6.zip |
kvm: x86: mmu: Do not use bit 63 for tracking special SPTEs
MMIO SPTEs currently set both bits 62 and 63 to distinguish them as special
PTEs. However, bit 63 is used as the SVE bit in Intel EPT PTEs. The SVE bit
is ignored for misconfigured PTEs but not necessarily for not-Present PTEs.
Since MMIO SPTEs use an EPT misconfiguration, so using bit 63 for them is
acceptable. However, the upcoming fast access tracking feature adds another
type of special tracking PTE, which uses not-Present PTEs and hence should
not set bit 63.
In order to use common bits to distinguish both type of special PTEs, we
now use only bit 62 as the special bit.
Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 7e594a325158..3272a5e4aaad 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -208,6 +208,13 @@ enum { PFERR_WRITE_MASK | \ PFERR_PRESENT_MASK) +/* + * The mask used to denote special SPTEs, which can be either MMIO SPTEs or + * Access Tracking SPTEs. We use bit 62 instead of bit 63 to avoid conflicting + * with the SVE bit in EPT PTEs. + */ +#define SPTE_SPECIAL_MASK (1ULL << 62) + /* apic attention bits */ #define KVM_APIC_CHECK_VAPIC 0 /* |