aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-07-10 10:50:55 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-20 13:16:29 -0400
commitd55e2cb20123cdb5020ec4a2b2f1eace5038c292 (patch)
tree6a02bb893638ded6448ee78687ee25072ea82360 /drivers/kvm/kvm.h
parent2cb7e714229681408e323852bed939989faf6991 (diff)
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 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index a7c5e6bee034..65ab268d4256 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -121,7 +121,7 @@ struct kvm_pte_chain {
121 * bits 4:7 - page table level for this shadow (1-4) 121 * bits 4:7 - page table level for this shadow (1-4)
122 * bits 8:9 - page table quadrant for 2-level guests 122 * bits 8:9 - page table quadrant for 2-level guests
123 * bit 16 - "metaphysical" - gfn is not a real page (huge page/real mode) 123 * bit 16 - "metaphysical" - gfn is not a real page (huge page/real mode)
124 * bits 17:18 - "access" - the user and writable bits of a huge page pde 124 * bits 17:19 - "access" - the user, writable, and nx bits of a huge page pde
125 */ 125 */
126union kvm_mmu_page_role { 126union kvm_mmu_page_role {
127 unsigned word; 127 unsigned word;
@@ -131,7 +131,7 @@ union kvm_mmu_page_role {
131 unsigned quadrant : 2; 131 unsigned quadrant : 2;
132 unsigned pad_for_nice_hex_output : 6; 132 unsigned pad_for_nice_hex_output : 6;
133 unsigned metaphysical : 1; 133 unsigned metaphysical : 1;
134 unsigned hugepage_access : 2; 134 unsigned hugepage_access : 3;
135 }; 135 };
136}; 136};
137 137