• Gavin Shan's avatar
    KVM: Support dirty ring in conjunction with bitmap · 86bdf3eb
    Gavin Shan authored
    
    
    ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
    enabled. It's conflicting with that ring-based dirty page tracking always
    requires a running VCPU context.
    
    Introduce a new flavor of dirty ring that requires the use of both VCPU
    dirty rings and a dirty bitmap. The expectation is that for non-VCPU
    sources of dirty memory (such as the VGIC/ITS on arm64), KVM writes to
    the dirty bitmap. Userspace should scan the dirty bitmap before migrating
    the VM to the target.
    
    Use an additional capability to advertise this behavior. The newly added
    capability (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) can't be enabled before
    KVM_CAP_DIRTY_LOG_RING_ACQ_REL on ARM64. In this way, the newly added
    capability is treated as an extension of KVM_CAP_DIRTY_LOG_RING_ACQ_REL.
    Suggested-by: default avatarMarc Zyngier <maz@kernel.org>
    Suggested-by: default avatarPeter Xu <peterx@redhat.com>
    Co-developed-by: default avatarOliver Upton <oliver.upton@linux.dev>
    Signed-off-by: Oliver Upton <oliver.upton@linux.de...
    86bdf3eb
Kconfig 1.78 KB