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 <marce...@redhat.com> --- 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