diff options
author | Avi Kivity <avi@qumranet.com> | 2007-07-10 16:50:55 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-20 19:16:29 +0200 |
commit | d55e2cb20123cdb5020ec4a2b2f1eace5038c292 (patch) | |
tree | 6a02bb893638ded6448ee78687ee25072ea82360 /drivers/kvm/paging_tmpl.h | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/of... (diff) | |
download | linux-d55e2cb20123cdb5020ec4a2b2f1eace5038c292.tar.xz linux-d55e2cb20123cdb5020ec4a2b2f1eace5038c292.zip |
KVM: MMU: Store nx bit for large page shadows
We need to distinguish between large page shadows which have the nx bit set
and those which don't. The problem shows up when booting a newer smp Linux
kernel, where the trampoline page (which is in real mode, which uses the
same shadow pages as large pages) is using the same mapping as a kernel data
page, which is mapped using nx, causing kvm to spin on that page.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to '')
-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, metaphysical = 1; hugepage_access = *guest_ent; hugepage_access &= PT_USER_MASK | PT_WRITABLE_MASK; + if (*guest_ent & PT64_NX_MASK) + hugepage_access |= (1 << 2); hugepage_access >>= PT_WRITABLE_SHIFT; table_gfn = (*guest_ent & PT_BASE_ADDR_MASK) >> PAGE_SHIFT; |