mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
935ace2fb5
Entering a guest is similar to exiting to user space. Pending work like handling signals, rescheduling, task work etc. needs to be handled before that. Provide generic infrastructure to avoid duplication of the same handling code all over the place. The transfer to guest mode handling is different from the exit to usermode handling, e.g. vs. rseq and live patching, so a separate function is used. The initial list of work items handled is: TIF_SIGPENDING, TIF_NEED_RESCHED, TIF_NOTIFY_RESUME Architecture specific TIF flags can be added via defines in the architecture specific include files. The calling convention is also different from the syscall/interrupt entry functions as KVM invokes this from the outer vcpu_run() loop with interrupts and preemption enabled. To prevent missing a pending work item it invokes a check for pending TIF work from interrupt disabled code right before transitioning to guest mode. The lockdep, RCU and tracing state handling is also done directly around the switch to and from guest mode. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200722220519.833296398@linutronix.de
66 lines
1005 B
Plaintext
66 lines
1005 B
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
# KVM common configuration items and defaults
|
|
|
|
config HAVE_KVM
|
|
bool
|
|
|
|
config HAVE_KVM_IRQCHIP
|
|
bool
|
|
|
|
config HAVE_KVM_IRQFD
|
|
bool
|
|
|
|
config HAVE_KVM_IRQ_ROUTING
|
|
bool
|
|
|
|
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)
|
|
|
|
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
|