aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r--drivers/kvm/paging_tmpl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index 7688cbf413c8..59ba752a6880 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -255,6 +255,8 @@ static void FNAME(set_pte)(struct kvm_vcpu *vcpu, pt_element_t gpte,
255 spte |= gpte & PT64_NX_MASK; 255 spte |= gpte & PT64_NX_MASK;
256 if (!dirty) 256 if (!dirty)
257 pte_access &= ~ACC_WRITE_MASK; 257 pte_access &= ~ACC_WRITE_MASK;
258 if (!(pte_access & ACC_EXEC_MASK))
259 spte |= PT64_NX_MASK;
258 260
259 page = gfn_to_page(vcpu->kvm, gfn); 261 page = gfn_to_page(vcpu->kvm, gfn);
260 262