[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 09/12] kvm: clear dirty bitmaps from all overlapping memslots
From: |
Christian Borntraeger |
Subject: |
Re: [PULL 09/12] kvm: clear dirty bitmaps from all overlapping memslots |
Date: |
Wed, 2 Oct 2019 18:13:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 02.10.19 18:01, Kevin Wolf wrote:
> Am 30.09.2019 um 15:19 hat Christian Borntraeger geschrieben:
>> From: Paolo Bonzini <address@hidden>
>>
>> Currently MemoryRegionSection has 1:1 mapping to KVMSlot.
>> However next patch will allow splitting MemoryRegionSection into
>> several KVMSlot-s, make sure that kvm_physical_log_slot_clear()
>> is able to handle such 1:N mapping.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> Signed-off-by: Igor Mammedov <address@hidden>
>> Reviewed-by: Peter Xu <address@hidden>
>> Message-Id: <address@hidden>
>> Acked-by: Paolo Bonzini <address@hidden>
>> Signed-off-by: Christian Borntraeger <address@hidden>
>
> This broke the build for me on F29:
>
> CC x86_64-softmmu/accel/kvm/kvm-all.o
> /tmp/qemu/accel/kvm/kvm-all.c: In function 'kvm_log_clear':
> /tmp/qemu/accel/kvm/kvm-all.c:1086:8: error: 'ret' may be used uninitialized
> in this function [-Werror=maybe-uninitialized]
> if (r < 0) {
> ^
> cc1: all warnings being treated as errors
>
Does
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index aabe097c410f..e2605da22e7e 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -712,7 +712,7 @@ static int kvm_physical_log_clear(KVMMemoryListener *kml,
KVMState *s = kvm_state;
uint64_t start, size, offset, count;
KVMSlot *mem;
- int ret, i;
+ int ret = 0, i;
if (!s->manual_dirty_log_protect) {
/* No need to do explicit clear */
fix the message?