Support 2**64 bytes memory regions.
PATCH 1/1 Support 2**64 bytes memory regions.
Memory regions created with size UINT64_MAX are currently treated as regions of size 2**64 bytes. This patch adds full support for such regions.
Signed-off-by Alexander Barabash <[email protected]>
--- exec.c | 4 ++++ memory.c | 72 ++++++++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 55 insertions(+), 21 deletions(-)
exec.c +4 -0
@@ -789,6 +789,10 @@ static void mem_add(MemoryListener *listener, MemoryRegionSection *section) remain.size -= now.size; remain.offset_within_address_space += now.size; remain.offset_within_region += now.size; +if ((remain.size ==TARGET_PAGE_SIZE -1 ) && + (section->size ==UINT64_MAX )) { + remain.size =TARGET_PAGE_SIZE ; + } } now = remain;if (now.size) {
memory.c +51 -21
178 lines not on this page · raw message
Signature · 1 line
1.7.9.5