Message ID | 20200722160121.9601-24-alazar@bitdefender.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | VM introspection - EPT Views and Virtualization Exceptions | expand |
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 810e22f41306..28ab4a1ba25a 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1601,7 +1601,13 @@ static bool spte_write_protect(u64 *sptep, bool pt_protect) static bool spte_read_protect(u64 *sptep) { u64 spte = *sptep; - bool exec_only_supported = (shadow_present_mask == 0ull); + bool exec_only_supported; + + if (kvm_ve_supported) + exec_only_supported = + (shadow_present_mask == VMX_EPT_SUPPRESS_VE_BIT); + else + exec_only_supported = (shadow_present_mask == 0ull); rmap_printk("rmap_read_protect: spte %p %llx\n", sptep, *sptep);