aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r--arch/x86/kvm/paging_tmpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index a28f09bb76c6..2bdd843ad63f 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -105,7 +105,7 @@ static unsigned FNAME(gpte_access)(struct kvm_vcpu *vcpu, pt_element_t gpte)
105 105
106 access = (gpte & (PT_WRITABLE_MASK | PT_USER_MASK)) | ACC_EXEC_MASK; 106 access = (gpte & (PT_WRITABLE_MASK | PT_USER_MASK)) | ACC_EXEC_MASK;
107#if PTTYPE == 64 107#if PTTYPE == 64
108 if (is_nx(vcpu)) 108 if (vcpu->arch.mmu.nx)
109 access &= ~(gpte >> PT64_NX_SHIFT); 109 access &= ~(gpte >> PT64_NX_SHIFT);
110#endif 110#endif
111 return access; 111 return access;
@@ -272,7 +272,7 @@ error:
272 walker->error_code |= PFERR_WRITE_MASK; 272 walker->error_code |= PFERR_WRITE_MASK;
273 if (user_fault) 273 if (user_fault)
274 walker->error_code |= PFERR_USER_MASK; 274 walker->error_code |= PFERR_USER_MASK;
275 if (fetch_fault && is_nx(vcpu)) 275 if (fetch_fault && mmu->nx)
276 walker->error_code |= PFERR_FETCH_MASK; 276 walker->error_code |= PFERR_FETCH_MASK;
277 if (rsvd_fault) 277 if (rsvd_fault)
278 walker->error_code |= PFERR_RSVD_MASK; 278 walker->error_code |= PFERR_RSVD_MASK;