|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] xen/x86: io_apic: Introduce a command line option to skip timer check
From: Julien Grall <jgrall@xxxxxxxxxx>
Currently, Xen will spend ~100ms to check if the timer works. If the
Admin knows their platform have a working timer, then it would be
handy to be able to bypass the check.
Introduce a command line option 'no_timer_check' (the name is
matching the Linux parameter) for this purpose.
Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
---
docs/misc/xen-command-line.pandoc | 7 +++++++
xen/arch/x86/io_apic.c | 11 +++++++++++
2 files changed, 18 insertions(+)
diff --git a/docs/misc/xen-command-line.pandoc
b/docs/misc/xen-command-line.pandoc
index 4872b9098e83..1f9d3106383f 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -1896,6 +1896,13 @@ This option is ignored in **pv-shim** mode.
### nr_irqs (x86)
> `= <integer>`
+### no_timer_works (x86)
+> `=<boolean>`
+
+> Default: `true`
+
+Disables the code which tests for broken timer IRQ sources.
+
### irq-max-guests (x86)
> `= <integer>`
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index b3afef8933d7..4875bb97003f 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -57,6 +57,14 @@ bool __initdata ioapic_ack_forced;
int __read_mostly nr_ioapic_entries[MAX_IO_APICS];
int __read_mostly nr_ioapics;
+/*
+ * The logic to check if the timer is working is expensive. So allow
+ * the admin to bypass it if they know their platform doesn't have
+ * a buggy timer.
+ */
+static bool __initdata no_timer_check;
+boolean_param("no_timer_check", no_timer_check);
+
/*
* Rough estimation of how many shared IRQs there are, can
* be changed anytime.
@@ -1502,6 +1510,9 @@ static int __init timer_irq_works(void)
{
unsigned long t1, flags;
+ if ( no_timer_check )
+ return 1;
+
t1 = ACCESS_ONCE(pit0_ticks);
local_save_flags(flags);
--
2.40.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |