x86/hpet: Don't enable legacy replacement mode unconditionally
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Apr 2021 10:05:20 +0000 (12:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Apr 2021 10:05:20 +0000 (12:05 +0200)
commitb14d8345e530a54710700ec5fcb0879c2e056d31
treec522009b3289ff7421fd6a156323b0a6dbd2c0e9
parent440e6d402dc2c01a5051b68c2a60ffe1453656aa
x86/hpet: Don't enable legacy replacement mode unconditionally

Commit e1de4c196a2e ("x86/timer: Fix boot on Intel systems using ITSSPRC
static PIT clock gating") was reported to cause boot failures on certain
AMD Ryzen systems.

Refine the fix to do nothing in the default case, and only attempt to
configure legacy replacement mode if IRQ0 is found to not be working.  If
legacy replacement mode doesn't help, undo it before falling back to other IRQ
routing configurations.

In addition, introduce a "hpet" command line option so this heuristic
can be overridden.  Since it makes little sense to introduce just
"hpet=legacy-replacement", also allow for a boolean argument as well as
"broadcast" to replace the separate "hpetbroadcast" option.

Reported-by: Frédéric Pierret frederic.pierret@qubes-os.org
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Frédéric Pierret <frederic.pierret@qubes-os.org>
master commit: b53173e7cdafb7a318a239d557478fd73734a86a
master date: 2021-04-15 18:25:40 +0100
docs/misc/xen-command-line.pandoc
xen/arch/x86/hpet.c
xen/arch/x86/io_apic.c
xen/include/asm-x86/hpet.h