kvm: Enable dirty ring for arm64
commit856e23a0fb92b0949eace7f43a521e0214246735
authorGavin Shan <gshan@redhat.com>
Tue, 9 May 2023 02:21:22 +0000 (9 12:21 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 May 2023 06:53:51 +0000 (18 08:53 +0200)
tree22e110619c6faadf6c79500378cbff22325f4b47
parent3794cb9485ca52a65494c6eb108ff280a7e98dbc
kvm: Enable dirty ring for arm64

arm64 has different capability from x86 to enable the dirty ring, which
is KVM_CAP_DIRTY_LOG_RING_ACQ_REL. Besides, arm64 also needs the backup
bitmap extension (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) when 'kvm-arm-gicv3'
or 'arm-its-kvm' device is enabled. Here the extension is always enabled
and the unnecessary overhead to do the last stage of dirty log synchronization
when those two devices aren't used is introduced, but the overhead should
be very small and acceptable. The benefit is cover future cases where those
two devices are used without modifying the code.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230509022122.20888-5-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c