From 052e87b073cb70afcd767d32f45af2794a5a65de Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 27 May 2013 10:08:27 +0200 Subject: memory: make section size a 128-bit integer So far, the size of all regions passed to listeners could fit in 64 bits, because artificial regions (containers and aliases) are eliminated by the memory core, leaving only device regions which have reasonable sizes An IOMMU however cannot be eliminated by the memory core, and may have an artificial size, hence we may need 65 bits to represent its size. Signed-off-by: Paolo Bonzini --- xen-all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xen-all.c') diff --git a/xen-all.c b/xen-all.c index 1a1d7bb..9b57350 100644 --- a/xen-all.c +++ b/xen-all.c @@ -418,7 +418,7 @@ static void xen_set_memory(struct MemoryListener *listener, { XenIOState *state = container_of(listener, XenIOState, memory_listener); hwaddr start_addr = section->offset_within_address_space; - ram_addr_t size = section->size; + ram_addr_t size = int128_get64(section->size); bool log_dirty = memory_region_is_logging(section->mr); hvmmem_type_t mem_type; @@ -522,7 +522,7 @@ static void xen_log_start(MemoryListener *listener, XenIOState *state = container_of(listener, XenIOState, memory_listener); xen_sync_dirty_bitmap(state, section->offset_within_address_space, - section->size); + int128_get64(section->size)); } static void xen_log_stop(MemoryListener *listener, MemoryRegionSection *section) @@ -539,7 +539,7 @@ static void xen_log_sync(MemoryListener *listener, MemoryRegionSection *section) XenIOState *state = container_of(listener, XenIOState, memory_listener); xen_sync_dirty_bitmap(state, section->offset_within_address_space, - section->size); + int128_get64(section->size)); } static void xen_log_global_start(MemoryListener *listener) -- cgit v1.1