[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 3/5] softmmu/memory_mapping: never merge ranges accross memory
From: |
David Hildenbrand |
Subject: |
[PATCH v1 3/5] softmmu/memory_mapping: never merge ranges accross memory regions |
Date: |
Wed, 10 Feb 2021 18:15:35 +0100 |
Let's make sure to not merge when different memory regions are involved.
Unlikely, but theoretically possible.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Claudio Fontana <cfontana@suse.de>
Cc: Thomas Huth <thuth@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
softmmu/memory_mapping.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c
index 2677392de7..ad4911427a 100644
--- a/softmmu/memory_mapping.c
+++ b/softmmu/memory_mapping.c
@@ -230,7 +230,8 @@ static void guest_phys_blocks_region_add(MemoryListener
*listener,
/* we want continuity in both guest-physical and host-virtual memory */
if (predecessor->target_end < target_start ||
- predecessor->host_addr + predecessor_size != host_addr) {
+ predecessor->host_addr + predecessor_size != host_addr ||
+ predecessor->mr != section->mr) {
predecessor = NULL;
}
}
--
2.29.2