diff options
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index a7c5cb0319ea..4b5391c717f8 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h | |||
@@ -366,6 +366,8 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, | |||
366 | metaphysical = 1; | 366 | metaphysical = 1; |
367 | hugepage_access = *guest_ent; | 367 | hugepage_access = *guest_ent; |
368 | hugepage_access &= PT_USER_MASK | PT_WRITABLE_MASK; | 368 | hugepage_access &= PT_USER_MASK | PT_WRITABLE_MASK; |
369 | if (*guest_ent & PT64_NX_MASK) | ||
370 | hugepage_access |= (1 << 2); | ||
369 | hugepage_access >>= PT_WRITABLE_SHIFT; | 371 | hugepage_access >>= PT_WRITABLE_SHIFT; |
370 | table_gfn = (*guest_ent & PT_BASE_ADDR_MASK) | 372 | table_gfn = (*guest_ent & PT_BASE_ADDR_MASK) |
371 | >> PAGE_SHIFT; | 373 | >> PAGE_SHIFT; |