Hi Gavin, On 2022/11/10 18:49, Gavin Shan wrote:
Enable ring-based dirty memory tracking on ARM64: - Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL. - Enable CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP. - Set KVM_DIRTY_LOG_PAGE_OFFSET for the ring buffer's physical page offset. - Add ARM64 specific kvm_arch_allow_write_without_running_vcpu() to keep the site of saving vgic/its tables out of the no-running-vcpu radar.
And we have KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES.. On receiving it, the emulated VGIC will write all pending bits (if any) into pending tables (which reside in guest memory) and doesn't require a running vcpu context. The no-running-vcpu WARN can be triggered with the kvm-unit-tests/its-pending-migration case. I run it using QEMU, which has nothing to do with the dirty ring atm. Or are there already discussions about it that I haven't noticed? |void mark_page_dirty_in_slot(struct kvm *kvm, | const struct kvm_memory_slot *memslot, | gfn_t gfn) |{ | WARN_ON_ONCE(!vcpu && !kvm_arch_allow_write_without_running_vcpu(kvm));