[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/30] softmmu/memory_mapping: never merge ranges accross memory r
From: |
Paolo Bonzini |
Subject: |
[PULL 28/30] softmmu/memory_mapping: never merge ranges accross memory regions |
Date: |
Sun, 3 Oct 2021 09:42:48 +0200 |
From: David Hildenbrand <david@redhat.com>
Let's make sure to not merge when different memory regions are involved.
Unlikely, but theoretically possible.
Acked-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Eduardo Habkost <ehabkost@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>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210727082545.17934-3-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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 e7af276546..d401ca7e31 100644
--- a/softmmu/memory_mapping.c
+++ b/softmmu/memory_mapping.c
@@ -229,7 +229,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.31.1
- [PULL 18/30] i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID, (continued)
- [PULL 18/30] i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID, Paolo Bonzini, 2021/10/03
- [PULL 22/30] i386: Change the default Hyper-V version to match WS2016, Paolo Bonzini, 2021/10/03
- [PULL 19/30] i386: Move HV_APIC_ACCESS_RECOMMENDED bit setting to hyperv_fill_cpuids(), Paolo Bonzini, 2021/10/03
- [PULL 21/30] i386: Make Hyper-V version id configurable, Paolo Bonzini, 2021/10/03
- [PULL 20/30] i386: Implement pseudo 'hv-avic' ('hv-apicv') enlightenment, Paolo Bonzini, 2021/10/03
- [PULL 23/30] configure: Loosen GCC requirement from 7.5.0 to 7.4.0, Paolo Bonzini, 2021/10/03
- [PULL 24/30] virtio-mem-pci: Fix memory leak when creating MEMORY_DEVICE_SIZE_CHANGE event, Paolo Bonzini, 2021/10/03
- [PULL 27/30] tpm: mark correct memory region range dirty when clearing RAM, Paolo Bonzini, 2021/10/03
- [PULL 26/30] monitor: Rate-limit MEMORY_DEVICE_SIZE_CHANGE qapi events per device, Paolo Bonzini, 2021/10/03
- [PULL 25/30] qapi: Include qom-path in MEMORY_DEVICE_SIZE_CHANGE qapi events, Paolo Bonzini, 2021/10/03
- [PULL 28/30] softmmu/memory_mapping: never merge ranges accross memory regions,
Paolo Bonzini <=
- [PULL 29/30] softmmu/memory_mapping: factor out adding physical memory ranges, Paolo Bonzini, 2021/10/03
- [PULL 30/30] softmmu/memory_mapping: optimize for RamDiscardManager sections, Paolo Bonzini, 2021/10/03
- Re: [PULL 00/30] Misc changes for 2021-10-03, Philippe Mathieu-Daudé, 2021/10/03
- Re: [PULL 00/30] Misc changes for 2021-10-03, Richard Henderson, 2021/10/03