Skip to content

Commit b36b0fe

Browse files
dwmw2jgross1
authored andcommitted
x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery
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> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://lore.kernel.org/r/20210106153958.584169-4-dwmw2@infradead.org Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 8f4fd86 commit b36b0fe

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5964,6 +5964,10 @@
59645964
This option is obsoleted by the "nopv" option, which
59655965
has equivalent effect for XEN platform.
59665966

5967+
xen_no_vector_callback
5968+
[KNL,X86,XEN] Disable the vector callback for Xen
5969+
event channel interrupts.
5970+
59675971
xen_scrub_pages= [XEN]
59685972
Boolean option to control scrubbing pages before giving them back
59695973
to Xen, for use by other domains. Can be also changed at runtime

arch/x86/xen/enlighten_hvm.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ static int xen_cpu_dead_hvm(unsigned int cpu)
188188
return 0;
189189
}
190190

191+
static bool no_vector_callback __initdata;
192+
191193
static void __init xen_hvm_guest_init(void)
192194
{
193195
if (xen_pv_domain())
@@ -207,7 +209,7 @@ static void __init xen_hvm_guest_init(void)
207209

208210
xen_panic_handler_init();
209211

210-
if (xen_feature(XENFEAT_hvm_callback_vector))
212+
if (!no_vector_callback && xen_feature(XENFEAT_hvm_callback_vector))
211213
xen_have_vector_callback = 1;
212214

213215
xen_hvm_smp_init();
@@ -233,6 +235,13 @@ static __init int xen_parse_nopv(char *arg)
233235
}
234236
early_param("xen_nopv", xen_parse_nopv);
235237

238+
static __init int xen_parse_no_vector_callback(char *arg)
239+
{
240+
no_vector_callback = true;
241+
return 0;
242+
}
243+
early_param("xen_no_vector_callback", xen_parse_no_vector_callback);
244+
236245
bool __init xen_hvm_need_lapic(void)
237246
{
238247
if (xen_pv_domain())

0 commit comments

Comments
 (0)