Skip to content

Commit 602f8ea

Browse files
davidhildenbrandbonzini
authored andcommitted
softmmu/memory_mapping: never merge ranges accross memory regions
Let's make sure to not merge when different memory regions are involved. Unlikely, but theoretically possible. Acked-by: Stefan Berger <[email protected]> Reviewed-by: Peter Xu <[email protected]> Cc: Marc-André Lureau <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Eduardo Habkost <[email protected]> Cc: Alex Williamson <[email protected]> Cc: Dr. David Alan Gilbert <[email protected]> Cc: Igor Mammedov <[email protected]> Cc: Claudio Fontana <[email protected]> Cc: Thomas Huth <[email protected]> Cc: "Alex Bennée" <[email protected]> Cc: Peter Xu <[email protected]> Cc: Laurent Vivier <[email protected]> Cc: Stefan Berger <[email protected]> Signed-off-by: David Hildenbrand <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 45e576c commit 602f8ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

softmmu/memory_mapping.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ static void guest_phys_blocks_region_add(MemoryListener *listener,
229229

230230
/* we want continuity in both guest-physical and host-virtual memory */
231231
if (predecessor->target_end < target_start ||
232-
predecessor->host_addr + predecessor_size != host_addr) {
232+
predecessor->host_addr + predecessor_size != host_addr ||
233+
predecessor->mr != section->mr) {
233234
predecessor = NULL;
234235
}
235236
}

0 commit comments

Comments
 (0)