diff mbox series

[v2,3/5] x86/xen: Add a no_vector_callback option to test PCI INTX delivery

Message ID 20210105235736.326797-4-dwmw2@infradead.org (mailing list archive)
State Superseded
Headers show
Series Xen INTX/GSI event channel delivery fixes | expand

Commit Message

David Woodhouse Jan. 5, 2021, 11:57 p.m. UTC
From: David Woodhouse <dwmw@amazon.co.uk>

It's useful to be able to test non-vector event channel delivery, to make
sure Linux will work properly on older Xen which doesn't have it.

It's also useful for those working on Xen and Xen-compatible hypervisors,
because there are guest kernels still in active use which use PCI INTX
even when vector delivery is available.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
 Documentation/admin-guide/kernel-parameters.txt |  4 ++++
 arch/x86/xen/enlighten_hvm.c                    | 11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

Comments

Boris Ostrovsky Jan. 6, 2021, 2:46 p.m. UTC | #1
On 1/5/21 6:57 PM, David Woodhouse wrote:
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index c722ec19cd00..35b10982d363 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3389,6 +3389,10 @@
>  
>  	nosync		[HW,M68K] Disables sync negotiation for all devices.
>  
> +	no_vector_callback
> +			[KNL,X86,XEN] Disable the vector callback for Xen
> +			event channel interrupts.


Sorry, I should have noticed this before --- I think this needs to be prefixed with "xen_". I know it's pretty long but otherwise this will be the first Xen-only option without such prefix (or without "xen." module). We already have a bunch of long names for Xen so it won't necessarily stick out.


-boris
David Woodhouse Jan. 6, 2021, 3:44 p.m. UTC | #2
On Wed, 2021-01-06 at 09:46 -0500, boris.ostrovsky@oracle.com wrote:
> Sorry, I should have noticed this before --- I think this needs to be
> prefixed with "xen_". I know it's pretty long but otherwise this will
> be the first Xen-only option without such prefix (or without "xen."
> module). We already have a bunch of long names for Xen so it won't
> necessarily stick out.

Done and reposted; thanks.
diff mbox series

Patch

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index c722ec19cd00..35b10982d363 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3389,6 +3389,10 @@ 
 
 	nosync		[HW,M68K] Disables sync negotiation for all devices.
 
+	no_vector_callback
+			[KNL,X86,XEN] Disable the vector callback for Xen
+			event channel interrupts.
+
 	nowatchdog	[KNL] Disable both lockup detectors, i.e.
 			soft-lockup and NMI watchdog (hard-lockup).
 
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 9e87ab010c82..a1c07e0c888e 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -188,6 +188,8 @@  static int xen_cpu_dead_hvm(unsigned int cpu)
        return 0;
 }
 
+static bool no_vector_callback __initdata;
+
 static void __init xen_hvm_guest_init(void)
 {
 	if (xen_pv_domain())
@@ -207,7 +209,7 @@  static void __init xen_hvm_guest_init(void)
 
 	xen_panic_handler_init();
 
-	if (xen_feature(XENFEAT_hvm_callback_vector))
+	if (!no_vector_callback && xen_feature(XENFEAT_hvm_callback_vector))
 		xen_have_vector_callback = 1;
 
 	xen_hvm_smp_init();
@@ -233,6 +235,13 @@  static __init int xen_parse_nopv(char *arg)
 }
 early_param("xen_nopv", xen_parse_nopv);
 
+static __init int xen_parse_no_vector_callback(char *arg)
+{
+	no_vector_callback = true;
+	return 0;
+}
+early_param("no_vector_callback", xen_parse_no_vector_callback);
+
 bool __init xen_hvm_need_lapic(void)
 {
 	if (xen_pv_domain())