KVM: x86/mmu: Get CR4.SMEP from MMU, not vCPU, in shadow page fault
[linux-2.6-microblaze.git] / arch / x86 / kvm / mmu / paging_tmpl.h
index 2f5a0e8..490a028 100644 (file)
@@ -903,7 +903,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gpa_t addr, u32 error_code,
                 * then we should prevent the kernel from executing it
                 * if SMEP is enabled.
                 */
-               if (kvm_read_cr4_bits(vcpu, X86_CR4_SMEP))
+               if (is_cr4_smep(vcpu->arch.mmu))
                        walker.pte_access &= ~ACC_EXEC_MASK;
        }