]> xenbits.xensource.com Git - xen.git/commit
x86/irq: limit interrupt movement done by fixup_irqs()
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 12 Jun 2024 12:30:40 +0000 (14:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 12 Jun 2024 12:30:40 +0000 (14:30 +0200)
commitc7564d7366d865cc407e3d64bca816d07edee174
treedaa310e09cc740ed6502bb67446054a29797bd24
parent0e8cde58848b85c93cea3797333874222e614f9b
x86/irq: limit interrupt movement done by fixup_irqs()

The current check used in fixup_irqs() to decide whether to move around
interrupts is based on the affinity mask, but such mask can have all bits set,
and hence is unlikely to be a subset of the input mask.  For example if an
interrupt has an affinity mask of all 1s, any input to fixup_irqs() that's not
an all set CPU mask would cause that interrupt to be shuffled around
unconditionally.

What fixup_irqs() care about is evacuating interrupts from CPUs not set on the
input CPU mask, and for that purpose it should check whether the interrupt is
assigned to a CPU not present in the input mask.  Assume that ->arch.cpu_mask
is a subset of the ->affinity mask, and keep the current logic that resets the
->affinity mask if the interrupt has to be shuffled around.

Doing the affinity movement based on ->arch.cpu_mask requires removing the
special handling to ->arch.cpu_mask done for high priority vectors, otherwise
the adjustment done to cpu_mask makes them always skip the CPU interrupt
movement.

While there also adjust the comment as to the purpose of fixup_irqs().

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/x86/include/asm/irq.h
xen/arch/x86/irq.c