diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-11 15:08:41 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:52:51 +0200 |
commit | c22e3514fceb2f514093ce1d19a2f660ac7347ae (patch) | |
tree | 7df0ec47014030c2dd126d25be868306ea87a7ec /drivers/kvm/paging_tmpl.h | |
parent | e3c5e7ec9efe0ebd47fa812cc86f01c51905edf6 (diff) | |
download | linux-c22e3514fceb2f514093ce1d19a2f660ac7347ae.tar.bz2 |
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>
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index da36e48fd026..e07cb2e006c2 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -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 { |