xen: cleanup config files
Subsystems (3)
Juergen Gross
maintainercover xen: cleanup config files
Do a cleanup of the Xen related Kconfig entries.
Juergen Gross (4):
x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
xen: Drop CONFIG_XEN_PVHVM
xen: Drop CONFIG_XEN_AUTO_XLATE
x86/xen: Drop CONFIG_XEN_PVHVM_SMP
arch/x86/include/asm/idtentry.h | 2 +- arch/x86/kernel/cpu/hypervisor.c | 2 +- arch/x86/xen/Kconfig | 12 ++---------- arch/x86/xen/Makefile | 11 +++++------ arch/x86/xen/time.c | 2 -- arch/x86/xen/xen-ops.h | 4 ---- drivers/xen/Kconfig | 6 ------ drivers/xen/Makefile | 2 +- drivers/xen/events/events_base.c | 7 ------- drivers/xen/privcmd.c | 4 ++-- drivers/xen/xenbus/xenbus_probe.c | 2 +- include/xen/platform_pci.h | 6 +++--- include/xen/xen-ops.h | 22 ---------------------- 13 files changed, 16 insertions(+), 66 deletions(-)
Signature · 1 line
2.55.0
Juergen Gross
maintainerPATCH 1/4 x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
CONFIG_XEN depends on CONFIG_X86_LOCAL_APIC already, so the dependency of CONFIG_XEN_PVHVM on CONFIG_X86_LOCAL_APIC can be dropped.
--- arch/x86/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/Kconfig +1 -1
@@ -52,7 +52,7 @@ config XEN_PV_DOM0 config XEN_PVHVM def_bool y - depends on XEN && X86_LOCAL_APIC + depends on XEN config XEN_PVHVM_SMP def_bool y
Signature · 1 line
2.55.0
Re: [PATCH 1/4] x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
Quoted 4 lines · Juergen Gross
CONFIG_XENdepends onCONFIG_X86_LOCAL_APICalready, so the dependency ofCONFIG_XEN_PVHVMonCONFIG_X86_LOCAL_APICcan be dropped.Signed-off-by Juergen Gross <[email protected]>
I've been noticing this every once in a while, but it never felt quite important enough to make a patch, sorry.
Jan
Re: [PATCH 1/4] x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
Quoted 7 lines · Jan Beulich
Quoted 4 lines · Juergen Gross
CONFIG_XENdepends onCONFIG_X86_LOCAL_APICalready, so the dependency ofCONFIG_XEN_PVHVMonCONFIG_X86_LOCAL_APICcan be dropped.Signed-off-by Juergen Gross <[email protected]>Reviewed-by Jan Beulich <[email protected]>
Hmm, looking at patch 2 I wonder: Isn't it XEN's dependency which wants dropping? XEN_PV shouldn't require X86_LOCAL_APIC, should it?
Jan
Re: [PATCH 1/4] x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
Quoted 9 lines · Jan Beulich
Quoted 6 lines · Jan Beulich
Quoted 4 lines · Juergen Gross
CONFIG_XENdepends onCONFIG_X86_LOCAL_APICalready, so the dependency ofCONFIG_XEN_PVHVMonCONFIG_X86_LOCAL_APICcan be dropped.Signed-off-by Juergen Gross <[email protected]>Reviewed-by Jan Beulich <[email protected]>Hmm, looking at patch 2 I wonder: Isn't it XEN's dependency which wants dropping?
XEN_PVshouldn't requireX86_LOCAL_APIC, should it?
In Linux terms, XEN_PV does need X86_LOCAL_APIC.
While the PV guest doesn't have an APIC directly, other areas (parsing the ACPI tables, configuring device interrupts) require Linux to think it's on a normal APIC-like system.
~Andrew
Re: [PATCH 1/4] x86/xen: Remove redundant config dependency on X86_LOCAL_APIC
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
CONFIG_XENdepends onCONFIG_X86_LOCAL_APICalready, so the dependency ofCONFIG_XEN_PVHVMonCONFIG_X86_LOCAL_APICcan be dropped.Signed-off-by Juergen Gross <[email protected]>
Quoted 21 lines
--- arch/x86/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/xen/Kconfig +1
-1@@ -52,7 +52,7 @@ config XEN_PV_DOM0 config XEN_PVHVM def_bool y - depends on XEN && X86_LOCAL_APIC + depends on XEN config XEN_PVHVM_SMP def_bool ySignature · 1 line
2.55.0
Juergen Gross
maintainerPATCH 2/4 xen: Drop CONFIG_XEN_PVHVM
In reply to Juergen GrossOn 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.
--- arch/x86/include/asm/idtentry.h | 2 +- arch/x86/kernel/cpu/hypervisor.c | 2 +- arch/x86/xen/Kconfig | 10 +++------- arch/x86/xen/Makefile | 9 ++++----- arch/x86/xen/time.c | 2 -- arch/x86/xen/xen-ops.h | 4 ---- drivers/xen/Kconfig | 2 +- drivers/xen/events/events_base.c | 7 ------- drivers/xen/xenbus/xenbus_probe.c | 2 +- include/xen/platform_pci.h | 6 +++--- 10 files changed, 14 insertions(+), 32 deletions(-)
arch/x86/include/asm/idtentry.h +1 -1
@@ -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
arch/x86/kernel/cpu/hypervisor.c +1 -1
@@ -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,
arch/x86/xen/Kconfig +3 -7
@@ -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.
arch/x86/xen/Makefile +4 -5
@@ -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
arch/x86/xen/time.c +0 -2
@@ -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)
arch/x86/xen/xen-ops.h +0 -4
@@ -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
drivers/xen/Kconfig +1 -1
@@ -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.
drivers/xen/events/events_base.c +0 -7
@@ -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;
drivers/xen/xenbus/xenbus_probe.c +1 -1
@@ -831,7 +831,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
include/xen/platform_pci.h +3 -3
@@ -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 );
Signature · 1 line
2.55.0
Re: [PATCH 2/4] xen: Drop CONFIG_XEN_PVHVM
Quoted 15 lines · Juergen Gross
On x86
CONFIG_XEN_PVHVMis now a synonym ofCONFIG_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_XENis defined, so it can be replaced withCONFIG_X86there.Signed-off-by Juergen Gross <[email protected]>arch/x86/include/asm/idtentry.h +0
-0
arch/x86/include/asm/idtentry.h DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0); · line 750
Quoted 7 lines
arch/x86/include/asm/idtentry.h +1
-1@@ -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
I'm very happy to see a reduction in the number of Kconfig symbols for Xen (there are definitely too many), but this looks wonky.
Or are you saying that there really is no way to build a Xen PV guest excluding the HVM-only bits?
~Andrew
Juergen Gross
maintainerRe: [PATCH 2/4] xen: Drop CONFIG_XEN_PVHVM
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Juergen Gross
On x86
CONFIG_XEN_PVHVMis now a synonym ofCONFIG_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_XENis defined, so it can be replaced withCONFIG_X86there.Signed-off-by Juergen Gross <[email protected]>arch/x86/include/asm/idtentry.h +0
-0arch/x86/include/asm/idtentry.h DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0); · line 750
Quoted 7 lines
arch/x86/include/asm/idtentry.h +1
-1@@ -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 I'm very happy to see a reduction in the number of
Kconfigsymbols for Xen (there are definitely too many), but this looks wonky.
Quoted 2 lines
Or are you saying that there really is no way to build a Xen PV guest excluding the HVM-only bits?
Seems so, yes.
This has been like this for at least several years now.
What you can do is to configure the kernel to exclude the Xen platform PCI device (CONFIG_XEN_PVHVM_GUEST=n).
Juergen
Re: [PATCH 2/4] xen: Drop CONFIG_XEN_PVHVM
Quoted 31 lines · Juergen Gross
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Juergen Gross
On x86
CONFIG_XEN_PVHVMis now a synonym ofCONFIG_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_XENis defined, so it can be replaced withCONFIG_X86there.Signed-off-by Juergen Gross <[email protected]>arch/x86/include/asm/idtentry.h +0
-0arch/x86/include/asm/idtentry.h line 750
Quoted 7 lines
arch/x86/include/asm/idtentry.h +1
-1@@ -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); #endifI'm very happy to see a reduction in the number of
Kconfigsymbols for Xen (there are definitely too many), but this looks wonky.Quoted 2 lines
Or are you saying that there really is no way to build a Xen PV guest excluding the HVM-only bits?
Quoted 6 lines
Seems so, yes.
This has been like this for at least several years now.
What you can do is to configure the kernel to exclude the Xen platform PCI device (
CONFIG_XEN_PVHVM_GUEST=n).
I think I caused this inadvertently in 34aff14580d1 ("xen: Remove Xen PVH/PVHVM dependency on PCI")
CONFIG_XEN_PVHVM should just be bool, and then XEN_PVH & XEN_PVHVM_GUEST can select it. Then it can be disabled for a PV only build.
I'll send it out, so you can evaluate it.
Regards,
Jason
Re: [PATCH 2/4] xen: Drop CONFIG_XEN_PVHVM
In reply to Juergen GrossQuoted 9 lines · Juergen Gross
On x86
CONFIG_XEN_PVHVMis now a synonym ofCONFIG_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_XENis defined, so it can be replaced withCONFIG_X86there.Signed-off-by Juergen Gross <[email protected]>
While I think there is value in compiling a tiny PV-only kernel (in fact I even have a real-world use case for it) the code addition is minimal and also considering your reply to Andrew:
Quoted 211 lines
--- arch/x86/include/asm/idtentry.h | 2 +- arch/x86/kernel/cpu/hypervisor.c | 2 +- arch/x86/xen/Kconfig | 10 +++------- arch/x86/xen/Makefile | 9 ++++----- arch/x86/xen/time.c | 2 -- arch/x86/xen/xen-ops.h | 4 ---- drivers/xen/Kconfig | 2 +- drivers/xen/events/events_base.c | 7 ------- drivers/xen/xenbus/xenbus_probe.c | 2 +- include/xen/platform_pci.h | 6 +++--- 10 files changed, 14 insertions(+), 32 deletions(-)arch/x86/include/asm/idtentry.h +1
-1@@ -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 arch/x86/kernel/cpu/hypervisor.c +1
-1@@ -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,arch/x86/xen/Kconfig +3
-7@@ -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.arch/x86/xen/Makefile +4
-5@@ -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.oarch/x86/xen/time.c +0
-2@@ -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)arch/x86/xen/xen-ops.h +0
-4@@ -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 drivers/xen/Kconfig +1
-1@@ -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.drivers/xen/events/events_base.c +0
-7@@ -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;drivers/xen/xenbus/xenbus_probe.c +1
-1@@ -831,7 +831,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 include/xen/platform_pci.h +3
-3@@ -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 );Signature · 1 line
2.55.0
Juergen Gross
maintainerPATCH 3/4 xen: Drop CONFIG_XEN_AUTO_XLATE
In reply to Juergen GrossCONFIG_XEN_AUTO_XLATE is referenced only in code built with CONFIG_XEN enabled. As it is enabled for all architectures supporting Xen, it can be just dropped.
--- drivers/xen/Kconfig | 6 ------ drivers/xen/Makefile | 2 +- drivers/xen/privcmd.c | 4 ++-- include/xen/xen-ops.h | 22 ---------------------- 4 files changed, 3 insertions(+), 31 deletions(-)
drivers/xen/Kconfig +0 -6
@@ -309,12 +309,6 @@ config XEN_EFI def_bool y depends on (ARM || ARM64 || X86_64) && EFI -config XEN_AUTO_XLATE - def_bool y - depends on ARM || ARM64 || X86 - help - Support for auto-translated physmap guests. - config XEN_ACPI def_bool y depends on X86 && ACPI
drivers/xen/Makefile +1 -1
@@ -2,6 +2,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o obj-y += grant-table.o features.o balloon.o manage.o time.o obj-y += mem-reservation.o +obj-y += xlate_mmu.o obj-y += events/ obj-y += xenbus/
@@ -29,7 +30,6 @@ obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o obj-$(CONFIG_XEN_EFI) += efi.o obj-$(CONFIG_XEN_SCSI_BACKEND) += xen-scsiback.o -obj-$(CONFIG_XEN_AUTO_XLATE) += xlate_mmu.o obj-$(CONFIG_XEN_PVCALLS_BACKEND) += pvcalls-back.o obj-$(CONFIG_XEN_PVCALLS_FRONTEND) += pvcalls-front.o xen-evtchn-y := evtchn.o
drivers/xen/privcmd.c +2 -2
@@ -794,7 +794,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file, goto out; } -if (IS_ENABLED (CONFIG_XEN_AUTO_XLATE ) && !xen_pv_domain ()) { +if (!xen_pv_domain ()) {unsigned int nr =DIV_ROUND_UP (kdata.num,XEN_PFN_PER_PAGE );struct page **pages;unsigned int i;
@@ -825,7 +825,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file,if (rc) goto out; -if (IS_ENABLED (CONFIG_XEN_AUTO_XLATE ) && !xen_pv_domain ()) { +if (!xen_pv_domain ()) { rc =xen_remap_vma_range (vma, kdata.addr, kdata.num <<PAGE_SHIFT ); }else { unsigned int domid =
include/xen/xen-ops.h +0 -22
@@ -59,7 +59,6 @@ static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,struct vm_area_struct ; -#ifdef CONFIG_XEN_AUTO_XLATE int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, unsigned long addr, xen_pfn_t *gfn, int nr,
@@ -68,27 +67,6 @@ int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, struct page **pages);int xen_xlate_unmap_gfn_range (struct vm_area_struct *vma,int nr,struct page **pages); -#else -/* -* These two functions are called from arch/x86/xen/mmu.c and so stubs -* are needed for a configuration not specifying CONFIG_XEN_AUTO_XLATE. -*/ -static inline int xen_xlate_remap_gfn_array (struct vm_area_struct *vma, -unsigned long addr, -xen_pfn_t *gfn,int nr, -int *err_ptr,pgprot_t prot, -unsigned int domid, -struct page **pages) -{ -return -EOPNOTSUPP ; -} - -static inline int xen_xlate_unmap_gfn_range (struct vm_area_struct *vma, -int nr,struct page **pages) -{ -return -EOPNOTSUPP ; -} -#endif int xen_remap_vma_range (struct vm_area_struct *vma,unsigned long addr,unsigned long len);
Signature · 1 line
2.55.0
Re: [PATCH 3/4] xen: Drop CONFIG_XEN_AUTO_XLATE
drivers/xen/Kconfig config XEN_EFI · line 314
Quoted 9 lines · Juergen Gross
drivers/xen/Kconfig +0
-3@@ -309,12 +309,6 @@ config XEN_EFI def_bool y depends on (ARM || ARM64 || X86_64) && EFI -config XEN_AUTO_XLATE - def_bool y - depends on ARM || ARM64 || X86
Yet is/was X86 correct here? Shouldn't that exclude PV-only configs?
Jan
Juergen Gross
maintainerRe: [PATCH 3/4] xen: Drop CONFIG_XEN_AUTO_XLATE
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Juergen Gross
drivers/xen/Kconfig +0
-0@@ -309,12 +309,6 @@ config XEN_EFI def_bool y depends on (ARM || ARM64 || X86_64) && EFI
Quoted 5 lines
drivers/xen/Kconfig config XEN_EFI · line 314
Quoted 3 lines
drivers/xen/Kconfig +0
-3-config XEN_AUTO_XLATE - def_bool y - depends on ARM || ARM64 || X86Yet is/was X86 correct here? Shouldn't that exclude PV-only configs?
Again, those don't exist.
Juergen
Re: [PATCH 3/4] xen: Drop CONFIG_XEN_AUTO_XLATE
In reply to Juergen GrossQuoted 5 lines · Juergen Gross
CONFIG_XEN_AUTO_XLATEis referenced only in code built withCONFIG_XENenabled. As it is enabled for all architectures supporting Xen, it can be just dropped.Signed-off-by Juergen Gross <[email protected]>
Quoted 109 lines
--- drivers/xen/Kconfig | 6 ------ drivers/xen/Makefile | 2 +- drivers/xen/privcmd.c | 4 ++-- include/xen/xen-ops.h | 22 ---------------------- 4 files changed, 3 insertions(+), 31 deletions(-)drivers/xen/Kconfig +0
-6@@ -309,12 +309,6 @@ config XEN_EFI def_bool y depends on (ARM || ARM64 || X86_64) && EFI -config XEN_AUTO_XLATE - def_bool y - depends on ARM || ARM64 || X86 - help - Support for auto-translated physmap guests. - config XEN_ACPI def_bool y depends on X86 && ACPIdrivers/xen/Makefile +1
-1@@ -2,6 +2,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o obj-y += grant-table.o features.o balloon.o manage.o time.o obj-y += mem-reservation.o +obj-y += xlate_mmu.o obj-y += events/ obj-y += xenbus/@@ -29,7 +30,6 @@ obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o obj-$(CONFIG_XEN_EFI) += efi.o obj-$(CONFIG_XEN_SCSI_BACKEND) += xen-scsiback.o -obj-$(CONFIG_XEN_AUTO_XLATE) += xlate_mmu.o obj-$(CONFIG_XEN_PVCALLS_BACKEND) += pvcalls-back.o obj-$(CONFIG_XEN_PVCALLS_FRONTEND) += pvcalls-front.o xen-evtchn-y := evtchn.odrivers/xen/privcmd.c +2
-2@@ -794,7 +794,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file, goto out; } -if (IS_ENABLED (CONFIG_XEN_AUTO_XLATE ) && !xen_pv_domain ()) { +if (!xen_pv_domain ()) {unsigned int nr =DIV_ROUND_UP (kdata.num,XEN_PFN_PER_PAGE );struct page **pages;unsigned int i;@@ -825,7 +825,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file,if (rc) goto out; -if (IS_ENABLED (CONFIG_XEN_AUTO_XLATE ) && !xen_pv_domain ()) { +if (!xen_pv_domain ()) { rc =xen_remap_vma_range (vma, kdata.addr, kdata.num <<PAGE_SHIFT ); }else { unsigned int domid =include/xen/xen-ops.h +0
-22@@ -59,7 +59,6 @@ static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,struct vm_area_struct ; -#ifdef CONFIG_XEN_AUTO_XLATE int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, unsigned long addr, xen_pfn_t *gfn, int nr,@@ -68,27 +67,6 @@ int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, struct page **pages);int xen_xlate_unmap_gfn_range (struct vm_area_struct *vma,int nr,struct page **pages); -#else -/* -* These two functions are called from arch/x86/xen/mmu.c and so stubs -* are needed for a configuration not specifying CONFIG_XEN_AUTO_XLATE. -*/ -static inline int xen_xlate_remap_gfn_array (struct vm_area_struct *vma, -unsigned long addr, -xen_pfn_t *gfn,int nr, -int *err_ptr,pgprot_t prot, -unsigned int domid, -struct page **pages) -{ -return -EOPNOTSUPP ; -} - -static inline int xen_xlate_unmap_gfn_range (struct vm_area_struct *vma, -int nr,struct page **pages) -{ -return -EOPNOTSUPP ; -} -#endif int xen_remap_vma_range (struct vm_area_struct *vma,unsigned long addr,unsigned long len);Signature · 1 line
2.55.0
Juergen Gross
maintainerPATCH 4/4 x86/xen: Drop CONFIG_XEN_PVHVM_SMP
In reply to Juergen GrossCONFIG_XEN_PVHVM_SMP is referenced only on x86 in Xen specific code, so it can be replaced with CONFIG_SMP.
--- arch/x86/xen/Kconfig | 4 ---- arch/x86/xen/Makefile | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
arch/x86/xen/Kconfig +0 -4
@@ -50,10 +50,6 @@ config XEN_PV_DOM0 def_bool y depends on XEN_PV && XEN_DOM0 -config XEN_PVHVM_SMP - def_bool y - depends on XEN && SMP - config XEN_PVHVM_GUEST bool "Xen PVHVM guest support" default y
arch/x86/xen/Makefile +1 -1
@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
Signature · 1 line
2.55.0
Re: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
arch/x86/xen/Makefile obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o · line 41
Quoted 9 lines · Juergen Gross
arch/x86/xen/Makefile +1
-1@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o
Similar issue here - in a PV-only config smp_hvm.o doesn't want / shouldn't need building.
Jan
Juergen Gross
maintainerRe: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Juergen Gross
arch/x86/xen/Makefile +0
-0@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o
Quoted 7 lines
arch/x86/xen/Makefile obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o · line 41
Quoted 4 lines
arch/x86/xen/Makefile +1
-1obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.oSimilar issue here - in a PV-only config smp_hvm.o doesn't want / shouldn't need building.
Note that I didn't change any functionality.
I agree that it seems a little bit strange, but in the end I believe the current status is okay-ish. PV-only hasn't been something in upstream Linux since Xen support was added, as PV was always meant to be an alternative to bare metal support via paravirt patching. It might have been possible to build a kernel not really functional on bare metal, but this was more like the ability to build a x86 kernel not working on any existing machine.
IMO the Xen kernel config options should allow for adding Xen-specific features, but minimum Xen support should always have basic HVM support, which includes the Xen specific performance enhancements.
Juergen
Re: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
Quoted 25 lines · Juergen Gross
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Juergen Gross
arch/x86/xen/Makefile +0
-0@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.oQuoted 7 lines
arch/x86/xen/Makefile obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o · line 41
Quoted 4 lines
arch/x86/xen/Makefile +1
-1obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.oSimilar issue here - in a PV-only config smp_hvm.o doesn't want / shouldn't need building.
Note that I didn't change any functionality.
I agree that it seems a little bit strange, but in the end I believe the current status is okay-ish. PV-only hasn't been something in upstream Linux since Xen support was added, as PV was always meant to be an alternative to bare metal support via paravirt patching. It might have been possible to build a kernel not really functional on bare metal, but this was more like the ability to build a x86 kernel not working on any existing machine.
Quoted 3 lines
IMO the Xen kernel config options should allow for adding Xen-specific features, but minimum Xen support should always have basic HVM support, which includes the Xen specific performance enhancements.
I fear I don't understand this. If I want a kernel just to run as PV Dom0, why would it need to carry anything HVM-ish? That is (or should be) entirely unrelated to being able to also run this same kernel on baremetal then.
Jan
Jürgen Groß
maintainerRe: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
Quoted 26 lines · Jan Beulich
Quoted 25 lines · Juergen Gross
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Juergen Gross
arch/x86/xen/Makefile +0
-0@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.oQuoted 7 lines
arch/x86/xen/Makefile obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o · line 41
Quoted 4 lines
arch/x86/xen/Makefile +1
-1obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.oSimilar issue here - in a PV-only config smp_hvm.o doesn't want / shouldn't need building.
Note that I didn't change any functionality.
I agree that it seems a little bit strange, but in the end I believe the current status is okay-ish. PV-only hasn't been something in upstream Linux since Xen support was added, as PV was always meant to be an alternative to bare metal support via paravirt patching. It might have been possible to build a kernel not really functional on bare metal, but this was more like the ability to build a x86 kernel not working on any existing machine.
Quoted 8 lines
Quoted 3 lines
IMO the Xen kernel config options should allow for adding Xen-specific features, but minimum Xen support should always have basic HVM support, which includes the Xen specific performance enhancements.
I fear I don't understand this. If I want a kernel just to run as PV Dom0, why would it need to carry anything HVM-ish? That is (or should be) entirely unrelated to being able to also run this same kernel on baremetal then.
The fact is that Xen PV-mode was always a feature not really liked especially by x86 maintainers (this is the polite way to phrase it).
Changing something outside of xen-specific parts of the kernel in favor of PV is nearly always a fight and I'm pretty sure I only get changes in by playing nice (not changing more than absolutely necessary and cleaning up constantly). I will certainly not try to push for a "PV-only" kernel while the hope of the x86 maintainers is more "PV will go away some time in future".
The capability to configure the kernel without HVM stuff but with Xen support is the way it has been since many years now. Nobody has missed a PV-only kernel, so I conclude there is no need for that. The closest we will get here is a PVH only kernel, and this is possible by not enabling CONFIG_XEN_PVHVM_GUEST.
Juergen
Re: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
Quoted 45 lines · Jürgen Groß
Quoted 26 lines · Jan Beulich
Quoted 25 lines · Juergen Gross
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Juergen Gross
arch/x86/xen/Makefile +0
-0@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.oQuoted 7 lines
arch/x86/xen/Makefile obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o · line 41
Quoted 4 lines
arch/x86/xen/Makefile +1
-1obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.oSimilar issue here - in a PV-only config smp_hvm.o doesn't want / shouldn't need building.
Note that I didn't change any functionality.
I agree that it seems a little bit strange, but in the end I believe the current status is okay-ish. PV-only hasn't been something in upstream Linux since Xen support was added, as PV was always meant to be an alternative to bare metal support via paravirt patching. It might have been possible to build a kernel not really functional on bare metal, but this was more like the ability to build a x86 kernel not working on any existing machine.
Quoted 8 lines
Quoted 3 lines
IMO the Xen kernel config options should allow for adding Xen-specific features, but minimum Xen support should always have basic HVM support, which includes the Xen specific performance enhancements.
I fear I don't understand this. If I want a kernel just to run as PV Dom0, why would it need to carry anything HVM-ish? That is (or should be) entirely unrelated to being able to also run this same kernel on baremetal then.
The fact is that Xen PV-mode was always a feature not really liked especially by x86 maintainers (this is the polite way to phrase it).
Changing something outside of xen-specific parts of the kernel in favor of PV is nearly always a fight and I'm pretty sure I only get changes in by playing nice (not changing more than absolutely necessary and cleaning up constantly). I will certainly not try to push for a "PV-only" kernel while the hope of the x86 maintainers is more "PV will go away some time in future".
Quoted 3 lines
The capability to configure the kernel without HVM stuff but with Xen support is the way it has been since many years now. Nobody has missed a PV-only kernel, so I conclude there is no need for that.
Just FTR - I did, even if maybe I never said so explicitly. But as it's just me ...
Jan
Quoted 5 lines
The closest we will get here is a PVH
only kernel, and this is possible by not enablingCONFIG_XEN_PVHVM_GUEST.Juergen
Re: [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
CONFIG_XEN_PVHVM_SMPis referenced only on x86 in Xen specific code, so it can be replaced withCONFIG_SMP.Signed-off-by Juergen Gross <[email protected]>
Quoted 38 lines
--- arch/x86/xen/Kconfig | 4 ---- arch/x86/xen/Makefile | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)arch/x86/xen/Kconfig +0
-4@@ -50,10 +50,6 @@ config XEN_PV_DOM0 def_bool y depends on XEN_PV && XEN_DOM0 -config XEN_PVHVM_SMP - def_bool y - depends on XEN && SMP - config XEN_PVHVM_GUEST bool "Xen PVHVM guest support" default yarch/x86/xen/Makefile +1
-1@@ -37,8 +37,8 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp_hvm.o obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o -obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.oSignature · 1 line
2.55.0