Re: [PATCH v2 1/6] KVM: s390: Fix dirty marking in adapter_indicators_set*()
From: Christian Borntraeger
Date: Tue Aug 18 2026 - 11:19:14 EST
Am 18.08.26 um 15:26 schrieb Matthew Rosato:
On 8/14/26 12:33 PM, Claudio Imbrenda wrote:
When the indicator and/or summary bits are set in the guest, the
accessed page was only marked dirty in KVM if the access was performed
using the slow path; accesses through the new kvm_arch_set_irq_inatomic
fast inject path would not mark the page as dirty.
Fix by adding/moving the missing calls to mark_page_dirty(). Note that
for the inatomic path set_page_dirty{,_lock}() is not needed as the
page stays pinned; the unpin path correctly marks it as dirty.
Opportunistically reorder the local variables to be in reverse
Christmas tree order and refactor to use guard().
Fixes: 1e95e3bc6b05 ("KVM: s390: Enable adapter_indicators_set to use mapped pages")
So I'm not strictly opposed to adding the dirtying on the 'fast path'
but AFAIU the idea here was to still mark the page as dirty right before
unpin.
Is it strictly required to dirty the page every time it's touched even
if it's long-term pinned, so long as we make sure to mark the page dirty
before we eventually unpin it?
Isnt that important for migration?