summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-22 21:57:57 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-22 21:57:57 +0000
commitc3bec939efffe46e245268fdfe6a8e1888362a3e (patch)
treee1a89f1aa9e504ffc99a78235101d88e79226464
parent131c79533932faa5cfcbfbdc3ad04eeff0ac08b4 (diff)
downloadqemu-c3bec939efffe46e245268fdfe6a8e1888362a3e.tar.gz
qemu-c3bec939efffe46e245268fdfe6a8e1888362a3e.tar.bz2
qemu-c3bec939efffe46e245268fdfe6a8e1888362a3e.zip
Fix PHYS_ADDR_MASK: upper bits of a PTE are reserved so they are 52 bits
long. Thanks to Paul Brook for noticing that. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4242 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-i386/helper2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index d5dc96ba16..106720aa7f 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -800,7 +800,8 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
#else
-#define PHYS_ADDR_MASK (~0xfff)
+/* Bits 52-62 of a PTE are reserved. Bit 63 is the NX bit. */
+#define PHYS_ADDR_MASK 0xffffffffff000L
/* return value:
-1 = cannot handle fault