Make ram_addr_t 64 bits unconditionally
PATCH 1/1 Make ram_addr_t 64 bits unconditionally
From: Bin Meng <[email protected]>
Currently machine->ram_size is a ram_addr_t, whose size is 64 bits if either (a) the host is 64 bits or (b) CONFIG_XEN_BACKEND is enabled, so it's effectively only 32 bits on 32-bit-not-x86.
commit 4be403c8158e ("Make target_phys_addr_t 64 bits unconditionally") did the change for target_phys_addr_t which is now hwaddr to be 64 bits unconditionally. Let's do the same to ram_addr_t.
---
include/exec/cpu-common.h | 6 ------ 1 file changed, 6 deletions(-)
include/exec/cpu-common.h +0 -6
@@ -32,15 +32,9 @@ enum device_endian {#endif /* address in the RAM (different from a physical address) */ -#if defined(CONFIG_XEN_BACKEND )typedef uint64_t ram_addr_t ;# define RAM_ADDR_MAX UINT64_MAX# define RAM_ADDR_FMT "%" PRIx64 -#else -typedef uintptr_t ram_addr_t ; -# define RAM_ADDR_MAX UINTPTR_MAX -# define RAM_ADDR_FMT "%" PRIxPTR -#endif /* memory API */
Signature · 1 line
2.7.4
Quoted 7 lines · Bin Meng
From: Bin Meng <[email protected]>
Currently
machine->ram_sizeis aram_addr_t, whose size is 64 bits if either (a) the host is 64 bits or (b)CONFIG_XEN_BACKENDis enabled, so it's effectively only 32 bits on 32-bit-not-x86.
Quoted 7 lines
commit
4be403c8158e("Maketarget_phys_addr_t64 bits unconditionally") did the change fortarget_phys_addr_twhich is now hwaddr to be 64 bits unconditionally. Let's do the same toram_addr_t.Suggested-by Peter Maydell <[email protected]>Signed-off-by Bin Meng <[email protected]>--
As noted on the other thread, I like this in principle, but I think it would be interesting to check whether it has a measurable perf impact on the non-x86-32-bit hosts that it affects.
-- PMM
Hi Peter,
Quoted 13 lines · Peter Maydell
Quoted 11 lines · Bin Meng
From: Bin Meng <[email protected]>
Currently
machine->ram_sizeis aram_addr_t, whose size is 64 bits if either (a) the host is 64 bits or (b)CONFIG_XEN_BACKENDis enabled, so it's effectively only 32 bits on 32-bit-not-x86.commit
4be403c8158e("Maketarget_phys_addr_t64 bits unconditionally") did the change fortarget_phys_addr_twhich is now hwaddr to be 64 bits unconditionally. Let's do the same toram_addr_t.
Quoted 8 lines
Quoted 3 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Bin Meng <[email protected]>--
As noted on the other thread, I like this in principle, but I think it would be interesting to check whether it has a measurable perf impact on the non-x86-32-bit hosts that it affects.
What measures should we take to move this on? I don't have any access to non-x86 32-bit hosts.
Regards,
Bin