qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-1.7 v2 1/8] exec: declare TARGET_PHYS_ADDR_SPACE


From: Marcel Apfelbaum
Subject: [Qemu-devel] [PATCH for-1.7 v2 1/8] exec: declare TARGET_PHYS_ADDR_SPACE_MAX to limit memory regions rendered by exec
Date: Thu, 7 Nov 2013 12:41:17 +0200

The page table logic in exec.c assumes
that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS.
Use TARGET_PHYS_ADDR_SPACE_MAX as max size for memory regions
rendered by exec.

Signed-off-by: Marcel Apfelbaum <address@hidden>
---
 include/exec/address-spaces.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h
index 3d12cdd..174cc05 100644
--- a/include/exec/address-spaces.h
+++ b/include/exec/address-spaces.h
@@ -23,6 +23,10 @@
 
 #ifndef CONFIG_USER_ONLY
 
+#define TARGET_PHYS_ADDR_SPACE_MAX                         \
+    (TARGET_PHYS_ADDR_SPACE_BITS == 64 ?                   \
+    UINT64_MAX : (0x1ULL << TARGET_PHYS_ADDR_SPACE_BITS))
+
 /* Get the root memory region.  This interface should only be used temporarily
  * until a proper bus interface is available.
  */
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]