mirror of
https://github.com/adulau/aha.git
synced 2025-01-01 13:46:24 +00:00
KVM: MMU: Fix nx access bit for huge pages
We must set the bit before the shift, otherwise the wrong bit gets set. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
e3c5e7ec9e
commit
c22e3514fc
1 changed files with 1 additions and 1 deletions
|
@ -382,9 +382,9 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
|
|||
metaphysical = 1;
|
||||
hugepage_access = walker->pte;
|
||||
hugepage_access &= PT_USER_MASK | PT_WRITABLE_MASK;
|
||||
hugepage_access >>= PT_WRITABLE_SHIFT;
|
||||
if (walker->pte & PT64_NX_MASK)
|
||||
hugepage_access |= (1 << 2);
|
||||
hugepage_access >>= PT_WRITABLE_SHIFT;
|
||||
table_gfn = (walker->pte & PT_BASE_ADDR_MASK)
|
||||
>> PAGE_SHIFT;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue