mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
86bdf3ebcf
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is enabled. It's conflicting with that ring-based dirty page tracking always requires a running VCPU context. Introduce a new flavor of dirty ring that requires the use of both VCPU dirty rings and a dirty bitmap. The expectation is that for non-VCPU sources of dirty memory (such as the VGIC/ITS on arm64), KVM writes to the dirty bitmap. Userspace should scan the dirty bitmap before migrating the VM to the target. Use an additional capability to advertise this behavior. The newly added capability (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) can't be enabled before KVM_CAP_DIRTY_LOG_RING_ACQ_REL on ARM64. In this way, the newly added capability is treated as an extension of KVM_CAP_DIRTY_LOG_RING_ACQ_REL. Suggested-by: Marc Zyngier <maz@kernel.org> Suggested-by: Peter Xu <peterx@redhat.com> Co-developed-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Gavin Shan <gshan@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221110104914.31280-4-gshan@redhat.com
95 lines
1.8 KiB
Plaintext
95 lines
1.8 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
# KVM common configuration items and defaults
|
|
|
|
config HAVE_KVM
|
|
bool
|
|
|
|
config HAVE_KVM_PFNCACHE
|
|
bool
|
|
|
|
config HAVE_KVM_IRQCHIP
|
|
bool
|
|
|
|
config HAVE_KVM_IRQFD
|
|
bool
|
|
|
|
config HAVE_KVM_IRQ_ROUTING
|
|
bool
|
|
|
|
config HAVE_KVM_DIRTY_RING
|
|
bool
|
|
|
|
# Only strongly ordered architectures can select this, as it doesn't
|
|
# put any explicit constraint on userspace ordering. They can also
|
|
# select the _ACQ_REL version.
|
|
config HAVE_KVM_DIRTY_RING_TSO
|
|
bool
|
|
select HAVE_KVM_DIRTY_RING
|
|
depends on X86
|
|
|
|
# Weakly ordered architectures can only select this, advertising
|
|
# to userspace the additional ordering requirements.
|
|
config HAVE_KVM_DIRTY_RING_ACQ_REL
|
|
bool
|
|
select HAVE_KVM_DIRTY_RING
|
|
|
|
# Allow enabling both the dirty bitmap and dirty ring. Only architectures
|
|
# that need to dirty memory outside of a vCPU context should select this.
|
|
config NEED_KVM_DIRTY_RING_WITH_BITMAP
|
|
bool
|
|
depends on HAVE_KVM_DIRTY_RING
|
|
|
|
config HAVE_KVM_EVENTFD
|
|
bool
|
|
select EVENTFD
|
|
|
|
config KVM_MMIO
|
|
bool
|
|
|
|
config KVM_ASYNC_PF
|
|
bool
|
|
|
|
# Toggle to switch between direct notification and batch job
|
|
config KVM_ASYNC_PF_SYNC
|
|
bool
|
|
|
|
config HAVE_KVM_MSI
|
|
bool
|
|
|
|
config HAVE_KVM_CPU_RELAX_INTERCEPT
|
|
bool
|
|
|
|
config KVM_VFIO
|
|
bool
|
|
|
|
config HAVE_KVM_ARCH_TLB_FLUSH_ALL
|
|
bool
|
|
|
|
config HAVE_KVM_INVALID_WAKEUPS
|
|
bool
|
|
|
|
config KVM_GENERIC_DIRTYLOG_READ_PROTECT
|
|
bool
|
|
|
|
config KVM_COMPAT
|
|
def_bool y
|
|
depends on KVM && COMPAT && !(S390 || ARM64 || RISCV)
|
|
|
|
config HAVE_KVM_IRQ_BYPASS
|
|
bool
|
|
|
|
config HAVE_KVM_VCPU_ASYNC_IOCTL
|
|
bool
|
|
|
|
config HAVE_KVM_VCPU_RUN_PID_CHANGE
|
|
bool
|
|
|
|
config HAVE_KVM_NO_POLL
|
|
bool
|
|
|
|
config KVM_XFER_TO_GUEST_WORK
|
|
bool
|
|
|
|
config HAVE_KVM_PM_NOTIFIER
|
|
bool
|