xen/events: Only force affinity mask for percpu interrupts
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2020 19:26:03 +0000 (20:26 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Dec 2020 15:19:36 +0000 (16:19 +0100)
commitf7a6f994b4f0ee69c656dda3da11431d92d6b08f
tree816d9d37df2488243d6290ca066c2bbd3d92f500
parent1ca1b4e2c0cbc88ce3939910ac36dca51d326fe4
xen/events: Only force affinity mask for percpu interrupts

All event channel setups bind the interrupt on CPU0 or the target CPU for
percpu interrupts and overwrite the affinity mask with the corresponding
cpumask. That does not make sense.

The XEN implementation of irqchip::irq_set_affinity() already picks a
single target CPU out of the affinity mask and the actual target is stored
in the effective CPU mask, so destroying the user chosen affinity mask
which might contain more than one CPU is wrong.

Change the implementation so that the channel is bound to CPU0 at the XEN
level and leave the affinity mask alone. At startup of the interrupt
affinity will be assigned out of the affinity mask and the XEN binding will
be updated. Only keep the enforcement for real percpu interrupts.

On resume the overwrite is not required either because info->cpu and the
affinity mask are still the same as at the time of suspend. Same for
rebind_evtchn_irq().

This also prepares for proper interrupt spreading.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20201210194045.250321315@linutronix.de
drivers/xen/events/events_base.c