aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-03-06 15:22:02 +0100
committerBlue Swirl <blauwirbel@gmail.com>2012-03-11 11:22:39 +0000
commit3f2cbf0d1a1340bed4a63e05b044c46df93f4768 (patch)
treec6ef216ba1164a3649444af31d266dd53a73c1b1 /target-i386/cpu.h
parentdac6b1b22cbad29ca34735a1e56c9feb9586e3c0 (diff)
downloadqemu-3f2cbf0d1a1340bed4a63e05b044c46df93f4768.zip
qemu-3f2cbf0d1a1340bed4a63e05b044c46df93f4768.tar.gz
qemu-3f2cbf0d1a1340bed4a63e05b044c46df93f4768.tar.bz2
target-i386: Mask NX bit from cpu_get_phys_page_debug result
This was a long pending bug, now revealed by the assert in phys_page_find that stumbled over the large page index returned by cpu_get_phys_page_debug for NX-marked pages: We need to mask out NX and all user-definable bits 52..62 from PDEs and the final PTE to avoid corrupting physical addresses. Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r--target-i386/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 196b0c5..36e3d29 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -241,6 +241,7 @@
#define PG_DIRTY_MASK (1 << PG_DIRTY_BIT)
#define PG_PSE_MASK (1 << PG_PSE_BIT)
#define PG_GLOBAL_MASK (1 << PG_GLOBAL_BIT)
+#define PG_HI_USER_MASK 0x7ff0000000000000LL
#define PG_NX_MASK (1LL << PG_NX_BIT)
#define PG_ERROR_W_BIT 1