Re: [PATCH v4 3/6] KVM: arm64: Add auto DBM support for hardware dirty tracking
From: Leonardo Bras
Date: Mon Sep 07 2026 - 06:59:27 EST
On Mon, Sep 07, 2026 at 11:17:27AM +0800, Tian Zheng wrote:
> On 9/2/2026 1:22 AM, Leonardo Bras wrote:
> > Hi Tian,
> >
> > It was already done here, but I got sidetracked and forgot to send before.
> >
> > https://lore.kernel.org/kvmarm/20260901171558.2674031-1-leo.bras@xxxxxxx/
> >
> > The relevant parts for the RO/RW -> RO/WC/WD conversion are in patches #1,
> > #2 and #3.
> >
>
> Hi, Leo,
>
> Oh, awesome!
>
> The RO/RW -> RO/WC/WD conversion is much clearer now.
>
> Which means when dirty logging is not active, all pages that were
> previously RW are now in the WD state.
Yes, that's how I thought the conversion would look simpler.
> The WC state only appears when
> dirty logging is actually enabled.
Correct! Note that for systems without enabled HAFDBS, both WC and RO will
behave exactly the same, faulting when memory is wrote to. That's why the
new helper keeps working :)
>
> This makes the state machine much more intuitive, and I think it aligns
> well with Oliver's suggestion to decouple permission from dirty state at
> the page table level.
Awesome!
>
> > >
> > > v5 already implements this, and I'm about to send it out shortly.
> > >
> >
> > Oh, awesome!
> > Please verify it against the patchset above, just in case :)
> >
> > Thanks!
> > Leo
> >
>
> I'll review the patches in detail and verify v5 against your series.
Just keep in mind that patch 5/5 is just there to try the idea, but it
could lay some important base for HDBSS.
> From what I've seen so far, performance with HDBSS looks great.
>
Awesome!
Thanks,
Leo