mbox series

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

Message ID 20240312201458.79532-1-philmd@linaro.org
Headers show
Series system/physmem: Fix migration dirty bitmap coherency with TCG memory access | expand

Message

Philippe Mathieu-Daudé March 12, 2024, 8:14 p.m. UTC
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(-)

Comments

Peter Xu March 12, 2024, 9:09 p.m. UTC | #1
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.
Richard Henderson March 12, 2024, 9:27 p.m. UTC | #2
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~
Nicholas Piggin March 13, 2024, 5:23 a.m. UTC | #3
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