[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
[Qemu-devel] [PATCH for-1.7 v2 3/8] hw/ppc: limit iommu-spapr memory size, Marcel Apfelbaum, 2013/11/07
[Qemu-devel] [PATCH for-1.7 v2 4/8] exec: don't ignore high address bits on lookup, Marcel Apfelbaum, 2013/11/07
[Qemu-devel] [PATCH for-1.7 v2 5/8] pci: fix address space size for bridge, Marcel Apfelbaum, 2013/11/07
[Qemu-devel] [PATCH for-1.7 v2 7/8] pc: s/INT64_MAX/UINT64_MAX/, Marcel Apfelbaum, 2013/11/07