[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/29] memory: call log_start after region_add
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 16/29] memory: call log_start after region_add |
Date: |
Wed, 18 Oct 2017 18:12:08 +0200 |
From: David Hildenbrand <address@hidden>
It might be confusing for some listener implementations that implement
both, region_add and log_start (e.g. KVM) if we call log_start before an
actual region was added using region_add.
This makes current KVM code trigger an assertion
("kvm_section_update_flags: error finding slot"). So let's just reverse
the order instead of tolerating log_start on yet unknown regions.
Reported-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Joe Clifford <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/memory.c b/memory.c
index b637c12..3e1558a 100644
--- a/memory.c
+++ b/memory.c
@@ -2607,12 +2607,12 @@ static void listener_add_address_space(MemoryListener
*listener,
.offset_within_address_space = int128_get64(fr->addr.start),
.readonly = fr->readonly,
};
- if (fr->dirty_log_mask && listener->log_start) {
- listener->log_start(listener, §ion, 0, fr->dirty_log_mask);
- }
if (listener->region_add) {
listener->region_add(listener, §ion);
}
+ if (fr->dirty_log_mask && listener->log_start) {
+ listener->log_start(listener, §ion, 0, fr->dirty_log_mask);
+ }
}
if (listener->commit) {
listener->commit(listener);
--
1.8.3.1
- [Qemu-devel] [PULL 08/29] pc: make sure that plugged CPUs are of the same type, (continued)
- [Qemu-devel] [PULL 08/29] pc: make sure that plugged CPUs are of the same type, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 09/29] disas: Always initialize read_memory_inner_func properly, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 10/29] build: remove CONFIG_LIBDECNUMBER, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 13/29] tco: add trace events, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 11/29] nios2: define tcg_env, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 17/29] kvm: fix alignment of ram address, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 15/29] target/i386: trap on instructions longer than >15 bytes, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 12/29] docs/devel/loads-stores.rst: Document our various load and store APIs, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 14/29] target/i386: introduce x86_ld*_code, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 19/29] kvm: fix error message when failing to unregister slot, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 16/29] memory: call log_start after region_add,
Paolo Bonzini <=
- [Qemu-devel] [PULL 18/29] kvm: tolerate non-existing slot for log_start/log_stop/log_sync, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 22/29] memory: reuse section_from_flat_range(), Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 21/29] kvm: simplify kvm_align_section(), Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 20/29] kvm: region_add and region_del is not called on updates, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 24/29] watch_mem_write: implement 8-byte accesses, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 25/29] qemu-pr-helper: use new libmultipath API, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 27/29] Revert "qdev: Free QemuOpts when the QOM path goes away", Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 29/29] scsi: reject configurations with logical block size > physical block size, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 26/29] qdev: store DeviceState's canonical path to use when unparenting, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 23/29] notdirty_mem_write: implement 8-byte accesses, Paolo Bonzini, 2017/10/18