xen: Drop CONFIG_XEN_PVHVM

On x86 CONFIG_XEN_PVHVM is now a synonym of CONFIG_XEN.

In Xen specific x86 code it can be just dropped, in non-Xen specific
x86 code it can be replaced with CONFIG_XEN.

In architecture independent code it is used only where CONFIG_XEN is
defined, so it can be replaced with CONFIG_X86 there.

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260805082137.1214967-3-jgross@suse.com>
This commit is contained in:
Juergen Gross 2026-08-05 10:21:35 +02:00
parent 9a86dc7b97
commit 0d91b71af9
10 changed files with 14 additions and 32 deletions

View File

@ -745,7 +745,7 @@ DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0);
DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_acrn_hv_callback);
#endif
#ifdef CONFIG_XEN_PVHVM
#ifdef CONFIG_XEN
DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_xen_hvm_callback);
#endif

View File

@ -31,7 +31,7 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] =
#ifdef CONFIG_XEN_PV
&x86_hyper_xen_pv,
#endif
#ifdef CONFIG_XEN_PVHVM
#ifdef CONFIG_XEN
&x86_hyper_xen_hvm,
#endif
&x86_hyper_vmware,

View File

@ -50,24 +50,20 @@ config XEN_PV_DOM0
def_bool y
depends on XEN_PV && XEN_DOM0
config XEN_PVHVM
def_bool y
depends on XEN
config XEN_PVHVM_SMP
def_bool y
depends on XEN_PVHVM && SMP
depends on XEN && SMP
config XEN_PVHVM_GUEST
bool "Xen PVHVM guest support"
default y
depends on XEN_PVHVM && PCI
depends on XEN && PCI
help
Support running as a Xen PVHVM guest.
config XEN_PVH
bool "Xen PVH guest support"
depends on XEN && XEN_PVHVM && ACPI
depends on XEN && ACPI
select PVH
help
Support for running as a Xen PVH guest.

View File

@ -16,11 +16,10 @@ obj-y += mmu.o
obj-y += time.o
obj-y += grant-table.o
obj-y += suspend.o
obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o
obj-$(CONFIG_XEN_PVHVM) += mmu_hvm.o
obj-$(CONFIG_XEN_PVHVM) += suspend_hvm.o
obj-$(CONFIG_XEN_PVHVM) += platform-pci-unplug.o
obj-y += enlighten_hvm.o
obj-y += mmu_hvm.o
obj-y += suspend_hvm.o
obj-y += platform-pci-unplug.o
obj-$(CONFIG_XEN_PV) += setup.o
obj-$(CONFIG_XEN_PV) += apic.o

View File

@ -586,7 +586,6 @@ void __init xen_init_time_ops(void)
x86_platform.set_wallclock = xen_set_wallclock;
}
#ifdef CONFIG_XEN_PVHVM
static void xen_hvm_setup_cpu_clockevents(void)
{
int cpu = smp_processor_id();
@ -643,7 +642,6 @@ void __init xen_hvm_init_time_ops(void)
hvm_time_initialized = true;
}
#endif
/* Kernel parameter to specify Xen timer slop */
static int __init parse_xen_timer_slop(char *ptr)

View File

@ -236,11 +236,7 @@ void xen_pin_vcpu(int cpu);
void xen_emergency_restart(void);
#ifdef CONFIG_XEN_PVHVM
void xen_hvm_post_suspend(int suspend_cancelled);
#else
static inline void xen_hvm_post_suspend(int suspend_cancelled) {}
#endif
/*
* The maximum amount of extra memory compared to the base size. The

View File

@ -311,7 +311,7 @@ config XEN_EFI
config XEN_AUTO_XLATE
def_bool y
depends on ARM || ARM64 || XEN_PVHVM
depends on ARM || ARM64 || X86
help
Support for auto-translated physmap guests.

View File

@ -2180,7 +2180,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = {
};
#ifdef CONFIG_X86
#ifdef CONFIG_XEN_PVHVM
/* Vector callbacks are better than PCI interrupts to receive event
* channel notifications because we can receive vector callbacks on any
* vcpu and we don't need PCI support or APIC interactions. */
@ -2242,12 +2241,6 @@ static __init void xen_alloc_callback_vector(void)
pr_info("Xen HVM callback vector for event delivery is enabled\n");
sysvec_install(HYPERVISOR_CALLBACK_VECTOR, sysvec_xen_hvm_callback);
}
#else
void xen_setup_callback_vector(void) {}
static inline void xen_init_setup_upcall_vector(void) {}
int xen_set_upcall_vector(unsigned int cpu) {}
static inline void xen_alloc_callback_vector(void) {}
#endif /* CONFIG_XEN_PVHVM */
#endif /* CONFIG_X86 */
bool xen_fifo_events = true;

View File

@ -833,7 +833,7 @@ static void xenbus_probe(void)
*/
static bool xs_hvm_defer_init_for_callback(void)
{
#ifdef CONFIG_XEN_PVHVM
#ifdef CONFIG_X86
return xen_store_domain_type == XS_HVM &&
!xen_have_vector_callback;
#else

View File

@ -30,7 +30,7 @@
static inline int xen_must_unplug_nics(void) {
#if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
defined(CONFIG_XEN_NETDEV_FRONTEND_MODULE)) && \
defined(CONFIG_XEN_PVHVM)
defined(CONFIG_X86)
return 1;
#else
return 0;
@ -40,14 +40,14 @@ static inline int xen_must_unplug_nics(void) {
static inline int xen_must_unplug_disks(void) {
#if (defined(CONFIG_XEN_BLKDEV_FRONTEND) || \
defined(CONFIG_XEN_BLKDEV_FRONTEND_MODULE)) && \
defined(CONFIG_XEN_PVHVM)
defined(CONFIG_X86)
return 1;
#else
return 0;
#endif
}
#if defined(CONFIG_XEN_PVHVM)
#if defined(CONFIG_X86)
extern bool xen_has_pv_devices(void);
extern bool xen_has_pv_disk_devices(void);
extern bool xen_has_pv_nic_devices(void);