[PATCH 0/4] Improve dirty ring warning report

From: Gavin Shan
Date: Sun Jan 15 2023 - 23:05:52 EST


It has been known case where no running VCPU context exists when the
vgic/its tables are saved. There are other two unknown cases where we
don't have the running VCPU context: (a) saving vgic3 LPI pending status
and (b) saving vgic3 pending tables. Besides, the warning reports in
mark_page_dirty_in_slot() is triggered even the dirty ring hasn't been
enabled by the user space. It's not the unexpected behaviour.

PATCH[1 - 2] Fixes the no-running VCPU context issue when vgic3 LPI
and vgic3 pending table are saved.
PATCH[3 - 4] Improve the warning reports by enabling them when the
dirty ring has been enabled by the user space.

Gavin Shan (4):
KVM: arm64: Allow saving vgic3 LPI pending status in no running vcpu
context
KVM: arm64: Allow saving vgic3 pending tables in no running vcpu
context
KVM: Refactor mark_page_dirty_in_slot()
KVM: Improve warning report in mark_page_dirty_in_slot()

Documentation/virt/kvm/api.rst | 8 ++++++--
arch/arm64/kvm/vgic/vgic-its.c | 3 ++-
arch/arm64/kvm/vgic/vgic-v3.c | 5 +++++
include/kvm/arm_vgic.h | 1 +
include/linux/kvm_dirty_ring.h | 5 +++++
virt/kvm/kvm_main.c | 30 ++++++++++++++++++------------
6 files changed, 37 insertions(+), 15 deletions(-)

--
2.23.0