On Tue, Sep 27, 2022 at 01:32:07PM -0400, Marc Zyngier wrote: > On Tue, 27 Sep 2022 12:02:52 -0400, > Peter Xu <peterx@xxxxxxxxxx> wrote: > > > > On Tue, Sep 27, 2022 at 08:54:36AM +0800, Gavin Shan wrote: > > > Enable ring-based dirty memory tracking on arm64 by selecting > > > CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL and providing the ring buffer's > > > physical page offset (KVM_DIRTY_LOG_PAGE_OFFSET). > > > > > > Signed-off-by: Gavin Shan <gshan@xxxxxxxxxx> > > > > Gavin, > > > > Any decision made on how to tackle with the GIC status dirty bits? > > Which dirty bits? Are you talking of the per-RD pending bits? Gavin found that some dirty pfn path may not have vcpu context for aarch64 offlist. Borrowing Gavin's trace dump: el0t_64_sync el0t_64_sync_handler el0_svc do_el0_svc __arm64_sys_ioctl kvm_device_ioctl vgic_its_set_attr vgic_its_save_tables_v0 kvm_write_guest __kvm_write_guest_page mark_page_dirty_in_slot With current code it'll trigger the warning in mark_page_dirty_in_slot. An userspace approach is doable by setting these pages as always dirty in userspace (QEMU), but even if so IIUC we'll need to drop the warning message in mark_page_dirty_in_slot() then we take no-vcpu dirty as no-op and expected. I'll leave the details to Gavin. Thanks, -- Peter Xu