Re: [PATCH v5 12/15] KVM: arm64: Derive the VM hardware dirty mode from dirty logging

From: Leonardo Bras

Date: Mon Nov 02 2026 - 11:10:34 EST


On Tue, Sep 29, 2026 at 06:36:52PM +0800, Tian Zheng wrote:
> Both HAFDBS and HDBSS flip VTCR_EL2.HD at memslot-update time. Two
> independent toggles allow an intermediate HDBSS-set/HD-clear state,
> an illegal combination, and need locking against concurrent updates.
>
> Replace both with kvm_arch_update_hw_dirty_mode(), a pure function
> of the static capabilities and the number of logging memslots:
>
> - logging && HDBSS-capable -> HD|HA|HDBSS
> - logging, no HDBSS -> off
> - !logging && HAFDBS-cap. -> HD|HA

This last one is gone now, so I guess most of this patch has to be
reworked, right?

Thanks!
Leo