[PATCH] x86/xen: call xen_set_upcall_vector() only after local apic setup

Jan Beulich jbeulich at suse.com
Mon Nov 14 01:32:48 PST 2022


On 12.11.2022 14:23, Juergen Gross wrote:
> Calling xen_set_upcall_vector() before the local APIC has been
> initialized results in warnings when setting up the local APIC:
> 
> [    0.037322] APIC: Stale IRR: 00080000, ...
> 
> Avoid this problem by moving the call of xen_set_upcall_vector() for
> APs from xen_cpu_up_prepare_hvm() to a new hotplug callback called on
> the AP before interrupts are enabled and after the local APIC has been
> initialized. There is already a Xen specific hotplug state defined at
> a matching position, but right now it is specific to Arm. So rename
> the CPUHP_AP_ARM_XEN_STARTING to CPUHP_AP_XEN_STARTING and use it for
> x86, too.
> 
> On the boot processor use the x86_init.irqs.intr_mode_init hook to
> call xen_set_upcall_vector() only after the local APIC initialization.
> As interrupts are on already at the time when the hook is being used,
> modify xen_init_setup_upcall_vector() to disable interrupts. This is
> needed as the xen_percpu_upcall flag is set only after the callback
> has been registered, and the flag is needed for correctly acknowledging
> an interrupt.
> 
> Fixes: b1c3497e604d ("x86/xen: Add support for HVMOP_set_evtchn_upcall_vector")
> Reported-by: Jan Beulich <jbeulich at suse.com>
> Signed-off-by: Juergen Gross <jgross at suse.com>

Just to mention it here - as per [1] the issue may instead result from
hypervisor misbehavior, so I guess we want to investigate that route
first.

Jan

[1] https://lists.xen.org/archives/html/xen-devel/2022-11/msg00783.html



More information about the linux-arm-kernel mailing list