Re: [PATCH v10 4/7] KVM: arm64: Enable ring-based dirty memory tracking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zenghui,

On 1/15/23 10:20 PM, Zenghui Yu wrote:
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));


It's a new case we never noticed. Could you please share the QEMU command lines
to start the guest? I need to reproduce the issue on my side firstly.

The fix would be simply to extending kvm->arch.vgic.save_its_tables_in_progress
from 'bool' to a bit map (e.g. kvm->arch.vgic.dirty_guest_memory_flags) and introduce
two separate flags for ITS table and VGIC3 pending bits separately. Alternatively,
we can also introduce another 'bool kvm->arch.vgic.save_vgic_v3_tables_in_progress'
to cover the new case.


Thanks,
Gavin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux