[PATCH-for-9.0 v2 0/3] system/physmem: Fix migration dirty bitmap coherency with TCG memory access

Philippe Mathieu-Daudé posted 3 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240312201458.79532-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
include/exec/exec-all.h |  1 +
include/exec/ram_addr.h | 12 ++++++++++++
system/physmem.c        | 10 ++++------
3 files changed, 17 insertions(+), 6 deletions(-)
[PATCH-for-9.0 v2 0/3] system/physmem: Fix migration dirty bitmap coherency with TCG memory access
Posted by Philippe Mathieu-Daudé 1 month, 2 weeks ago
Respin of Nicholas patch, without introducing
tcg_cpu_physical_memory_dirty_bits_cleared(),
and split in more digestible parts.

Nicholas Piggin (2):
  physmem: Factor cpu_physical_memory_dirty_bits_cleared() out
  physmem: Fix migration dirty bitmap coherency with TCG memory access

Philippe Mathieu-Daudé (1):
  physmem: Expose tlb_reset_dirty_range_all()

 include/exec/exec-all.h |  1 +
 include/exec/ram_addr.h | 12 ++++++++++++
 system/physmem.c        | 10 ++++------
 3 files changed, 17 insertions(+), 6 deletions(-)

-- 
2.41.0


Re: [PATCH-for-9.0 v2 0/3] system/physmem: Fix migration dirty bitmap coherency with TCG memory access
Posted by Richard Henderson 1 month, 2 weeks ago
On 3/12/24 10:14, Philippe Mathieu-Daudé wrote:
> Nicholas Piggin (2):
>    physmem: Factor cpu_physical_memory_dirty_bits_cleared() out
>    physmem: Fix migration dirty bitmap coherency with TCG memory access
> 
> Philippe Mathieu-Daudé (1):
>    physmem: Expose tlb_reset_dirty_range_all()

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

Re: [PATCH-for-9.0 v2 0/3] system/physmem: Fix migration dirty bitmap coherency with TCG memory access
Posted by Peter Xu 1 month, 2 weeks ago
On Tue, Mar 12, 2024 at 09:14:55PM +0100, Philippe Mathieu-Daudé wrote:
> Respin of Nicholas patch, without introducing
> tcg_cpu_physical_memory_dirty_bits_cleared(),
> and split in more digestible parts.
> 
> Nicholas Piggin (2):
>   physmem: Factor cpu_physical_memory_dirty_bits_cleared() out
>   physmem: Fix migration dirty bitmap coherency with TCG memory access
> 
> Philippe Mathieu-Daudé (1):
>   physmem: Expose tlb_reset_dirty_range_all()
> 
>  include/exec/exec-all.h |  1 +
>  include/exec/ram_addr.h | 12 ++++++++++++
>  system/physmem.c        | 10 ++++------
>  3 files changed, 17 insertions(+), 6 deletions(-)

Yes agree a better split than the single patch.  Tentatively queued while
waiting for any comments.

-- 
Peter Xu


Re: [PATCH-for-9.0 v2 0/3] system/physmem: Fix migration dirty bitmap coherency with TCG memory access
Posted by Nicholas Piggin 1 month, 2 weeks ago
On Wed Mar 13, 2024 at 7:09 AM AEST, Peter Xu wrote:
> On Tue, Mar 12, 2024 at 09:14:55PM +0100, Philippe Mathieu-Daudé wrote:
> > Respin of Nicholas patch, without introducing
> > tcg_cpu_physical_memory_dirty_bits_cleared(),
> > and split in more digestible parts.
> > 
> > Nicholas Piggin (2):
> >   physmem: Factor cpu_physical_memory_dirty_bits_cleared() out
> >   physmem: Fix migration dirty bitmap coherency with TCG memory access
> > 
> > Philippe Mathieu-Daudé (1):
> >   physmem: Expose tlb_reset_dirty_range_all()
> > 
> >  include/exec/exec-all.h |  1 +
> >  include/exec/ram_addr.h | 12 ++++++++++++
> >  system/physmem.c        | 10 ++++------
> >  3 files changed, 17 insertions(+), 6 deletions(-)
>
> Yes agree a better split than the single patch.  Tentatively queued while
> waiting for any comments.

I've run into several other possible races / lost dirty tracking
when stressing this stuff, but this one was the easiest to hit and
most obvious and simple fix, so I think it's still good to go.

Also have a qtest test case that can reproduce this one so I'll
send that after this is merged. It's really just the migration
test case with value verification added in.

Thanks,
Nick