[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap |
Date: |
Wed, 28 Jun 2017 13:32:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Haozhong Zhang <address@hidden> wrote:
> On 06/28/17 11:09 +0200, Juan Quintela wrote:
>> Haozhong Zhang <address@hidden> wrote:
>> > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd
>> > argument 'start' is relative to the start of the ramblock 'rb'. When
>> > it's used to access the dirty memory bitmap of ram_list (i.e.
>> > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to
>> > the start of all RAM (i.e. rb->offset) should be added to it, which has
>> > however been missed since c/s 6b6712efcc. For a ramblock of host memory
>> > backend whose offset is not zero, cpu_physical_memory_sync_dirty_bitmap()
>> > synchronizes the incorrect part of the dirty memory bitmap of ram_list
>> > to the per ramblock dirty bitmap. As a result, a guest with host
>> > memory backend may crash after migration.
>> >
>> > Fix it by adding the offset of ramblock when accessing the dirty memory
>> > bitmap of ram_list in cpu_physical_memory_sync_dirty_bitmap().
>> >
>> > Reported-by: Stefan Hajnoczi <address@hidden>
>> > Signed-off-by: Haozhong Zhang <address@hidden>
>>
>>
>> Hi
>>
>> I need to add this patch to make it compile for me with all
>> architectures enabled.
>>
>> I am adding that to you patch, are you ok?
>>
>
> Remind me why your following patch is related to mine? My patch does
> not touch any vmstate.
O:-)
Because sometimes I got a bit sloppy.
Sorry.
Later, Juan.