mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
entry: Rename "kvm" entry code assets to "virt" to genericize APIs
Rename the "kvm" entry code files and Kconfigs to use generic "virt" nomenclature so that the code can be reused by other hypervisors (or rather, their root/dom0 partition drivers), without incorrectly suggesting the code somehow relies on and/or involves KVM. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
parent
6d0386ea99
commit
9be7e1e320
12 changed files with 19 additions and 19 deletions
|
|
@ -10200,7 +10200,7 @@ L: linux-kernel@vger.kernel.org
|
|||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
|
||||
F: include/linux/entry-common.h
|
||||
F: include/linux/entry-kvm.h
|
||||
F: include/linux/entry-virt.h
|
||||
F: include/linux/irq-entry-common.h
|
||||
F: kernel/entry/
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ menuconfig KVM
|
|||
select HAVE_KVM_CPU_RELAX_INTERCEPT
|
||||
select KVM_MMIO
|
||||
select KVM_GENERIC_DIRTYLOG_READ_PROTECT
|
||||
select KVM_XFER_TO_GUEST_WORK
|
||||
select VIRT_XFER_TO_GUEST_WORK
|
||||
select KVM_VFIO
|
||||
select HAVE_KVM_DIRTY_RING_ACQ_REL
|
||||
select NEED_KVM_DIRTY_RING_WITH_BITMAP
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ config KVM
|
|||
select KVM_GENERIC_HARDWARE_ENABLING
|
||||
select KVM_GENERIC_MMU_NOTIFIER
|
||||
select KVM_MMIO
|
||||
select KVM_XFER_TO_GUEST_WORK
|
||||
select VIRT_XFER_TO_GUEST_WORK
|
||||
select SCHED_INFO
|
||||
select GUEST_PERF_EVENTS if PERF_EVENTS
|
||||
help
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ config KVM
|
|||
select KVM_GENERIC_DIRTYLOG_READ_PROTECT
|
||||
select KVM_GENERIC_HARDWARE_ENABLING
|
||||
select KVM_MMIO
|
||||
select KVM_XFER_TO_GUEST_WORK
|
||||
select VIRT_XFER_TO_GUEST_WORK
|
||||
select KVM_GENERIC_MMU_NOTIFIER
|
||||
select SCHED_INFO
|
||||
select GUEST_PERF_EVENTS if PERF_EVENTS
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ config KVM_X86
|
|||
select HAVE_KVM_MSI
|
||||
select HAVE_KVM_CPU_RELAX_INTERCEPT
|
||||
select HAVE_KVM_NO_POLL
|
||||
select KVM_XFER_TO_GUEST_WORK
|
||||
select VIRT_XFER_TO_GUEST_WORK
|
||||
select KVM_GENERIC_DIRTYLOG_READ_PROTECT
|
||||
select KVM_VFIO
|
||||
select HAVE_KVM_PM_NOTIFIER if PM
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __LINUX_ENTRYKVM_H
|
||||
#define __LINUX_ENTRYKVM_H
|
||||
#ifndef __LINUX_ENTRYVIRT_H
|
||||
#define __LINUX_ENTRYVIRT_H
|
||||
|
||||
#include <linux/static_call_types.h>
|
||||
#include <linux/resume_user_mode.h>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#include <linux/tick.h>
|
||||
|
||||
/* Transfer to guest mode work */
|
||||
#ifdef CONFIG_KVM_XFER_TO_GUEST_WORK
|
||||
#ifdef CONFIG_VIRT_XFER_TO_GUEST_WORK
|
||||
|
||||
#ifndef ARCH_XFER_TO_GUEST_MODE_WORK
|
||||
# define ARCH_XFER_TO_GUEST_MODE_WORK (0)
|
||||
|
|
@ -90,6 +90,6 @@ static inline bool xfer_to_guest_mode_work_pending(void)
|
|||
lockdep_assert_irqs_disabled();
|
||||
return __xfer_to_guest_mode_work_pending();
|
||||
}
|
||||
#endif /* CONFIG_KVM_XFER_TO_GUEST_WORK */
|
||||
#endif /* CONFIG_VIRT_XFER_TO_GUEST_WORK */
|
||||
|
||||
#endif
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef __KVM_HOST_H
|
||||
#define __KVM_HOST_H
|
||||
|
||||
#include <linux/entry-kvm.h>
|
||||
#include <linux/entry-virt.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/list.h>
|
||||
|
|
@ -2444,7 +2444,7 @@ static inline int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu)
|
|||
}
|
||||
#endif /* CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE */
|
||||
|
||||
#ifdef CONFIG_KVM_XFER_TO_GUEST_WORK
|
||||
#ifdef CONFIG_VIRT_XFER_TO_GUEST_WORK
|
||||
static inline void kvm_handle_signal_exit(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
vcpu->run->exit_reason = KVM_EXIT_INTR;
|
||||
|
|
@ -2461,7 +2461,7 @@ static inline int kvm_xfer_to_guest_mode_handle_work(struct kvm_vcpu *vcpu)
|
|||
}
|
||||
return r;
|
||||
}
|
||||
#endif /* CONFIG_KVM_XFER_TO_GUEST_WORK */
|
||||
#endif /* CONFIG_VIRT_XFER_TO_GUEST_WORK */
|
||||
|
||||
/*
|
||||
* If more than one page is being (un)accounted, @virt must be the address of
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ static inline void rcu_sysrq_start(void) { }
|
|||
static inline void rcu_sysrq_end(void) { }
|
||||
#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
|
||||
|
||||
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_KVM_XFER_TO_GUEST_WORK))
|
||||
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_VIRT_XFER_TO_GUEST_WORK))
|
||||
void rcu_irq_work_resched(void);
|
||||
#else
|
||||
static __always_inline void rcu_irq_work_resched(void) { }
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ CFLAGS_common.o += -fno-stack-protector
|
|||
|
||||
obj-$(CONFIG_GENERIC_IRQ_ENTRY) += common.o
|
||||
obj-$(CONFIG_GENERIC_SYSCALL) += syscall-common.o syscall_user_dispatch.o
|
||||
obj-$(CONFIG_KVM_XFER_TO_GUEST_WORK) += kvm.o
|
||||
obj-$(CONFIG_VIRT_XFER_TO_GUEST_WORK) += virt.o
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <linux/entry-kvm.h>
|
||||
#include <linux/entry-virt.h>
|
||||
|
||||
static int xfer_to_guest_mode_work(unsigned long ti_work)
|
||||
{
|
||||
|
|
@ -573,7 +573,7 @@ void rcutorture_format_gp_seqs(unsigned long long seqs, char *cp, size_t len)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(rcutorture_format_gp_seqs);
|
||||
|
||||
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_KVM_XFER_TO_GUEST_WORK))
|
||||
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_VIRT_XFER_TO_GUEST_WORK))
|
||||
/*
|
||||
* An empty function that will trigger a reschedule on
|
||||
* IRQ tail once IRQs get re-enabled on userspace/guest resume.
|
||||
|
|
@ -602,7 +602,7 @@ noinstr void rcu_irq_work_resched(void)
|
|||
if (IS_ENABLED(CONFIG_GENERIC_ENTRY) && !(current->flags & PF_VCPU))
|
||||
return;
|
||||
|
||||
if (IS_ENABLED(CONFIG_KVM_XFER_TO_GUEST_WORK) && (current->flags & PF_VCPU))
|
||||
if (IS_ENABLED(CONFIG_VIRT_XFER_TO_GUEST_WORK) && (current->flags & PF_VCPU))
|
||||
return;
|
||||
|
||||
instrumentation_begin();
|
||||
|
|
@ -611,7 +611,7 @@ noinstr void rcu_irq_work_resched(void)
|
|||
}
|
||||
instrumentation_end();
|
||||
}
|
||||
#endif /* #if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_KVM_XFER_TO_GUEST_WORK)) */
|
||||
#endif /* #if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_VIRT_XFER_TO_GUEST_WORK)) */
|
||||
|
||||
#ifdef CONFIG_PROVE_RCU
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ config HAVE_KVM_VCPU_RUN_PID_CHANGE
|
|||
config HAVE_KVM_NO_POLL
|
||||
bool
|
||||
|
||||
config KVM_XFER_TO_GUEST_WORK
|
||||
config VIRT_XFER_TO_GUEST_WORK
|
||||
bool
|
||||
|
||||
config HAVE_KVM_PM_NOTIFIER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue