]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config option
authorMarc Zyngier <maz@kernel.org>
Mon, 26 Sep 2022 14:51:16 +0000 (15:51 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 29 Sep 2022 09:23:08 +0000 (10:23 +0100)
commitaf242019f97617e250fc72af4857faeffabcda0d
tree79e7babcef9a32617591bd2147206b00dab25714
parent517b0607945cc8904a48567ac015e02d36ee8fb9
KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config option

In order to differenciate between architectures that require no extra
synchronisation when accessing the dirty ring and those who do,
add a new capability (KVM_CAP_DIRTY_LOG_RING_ACQ_REL) that identify
the latter sort. TSO architectures can obviously advertise both, while
relaxed architectures must only advertise the ACQ_REL version.

This requires some configuration symbol rejigging, with HAVE_KVM_DIRTY_RING
being only indirectly selected by two top-level config symbols:
- HAVE_KVM_DIRTY_RING_TSO for strongly ordered architectures (x86)
- HAVE_KVM_DIRTY_RING_ACQ_REL for weakly ordered architectures (arm64)

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20220926145120.27974-3-maz@kernel.org
arch/x86/kvm/Kconfig
include/uapi/linux/kvm.h
virt/kvm/Kconfig
virt/kvm/kvm_main.c