Thread (2 messages) 2 messages, 2 authors, 2022-11-14

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

From: Jan Beulich <hidden>
Date: 2022-11-14 09:33:03
Also in: lkml, xen-devel

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 <redacted>
Signed-off-by: Juergen Gross <jgross@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help