xen/common: Restore IRQ affinity when hotplugging a pCPU
authorMirela Simonovic <mirela.simonovic@aggios.com>
Fri, 1 Jun 2018 13:17:46 +0000 (15:17 +0200)
committerJulien Grall <julien.grall@arm.com>
Tue, 5 Jun 2018 18:08:05 +0000 (19:08 +0100)
commitefaa91afa28c36579a34702614fa3948c7e78aed
treee848530974266feaaea6181c6b8b389755dbbe46
parent2116030345746c4716b36a0af53b2a6e59ac93d6
xen/common: Restore IRQ affinity when hotplugging a pCPU

Non-boot pCPUs are being hot-unplugged during the system suspend to
RAM and hotplugged during the resume. When non-boot pCPUs are
hot-unplugged the interrupts that were targeted to them are migrated
to the boot pCPU.
On suspend, each guest could have its own wake-up devices/interrupts
(passthrough) that could trigger the system resume. These interrupts
could be targeted to a non-boot pCPU, e.g. if the guest's vCPU is
pinned to a non-boot pCPU. Due to the hot-unplug of non-boot pCPUs
during the suspend such interrupts will be migrated from non-boot pCPUs
to the boot pCPU (this is fine). However, when non-boot pCPUs are
hotplugged on resume, these interrupts are not migrated back to non-boot
pCPUs, i.e. IRQ affinity is not restored on resume (this is wrong).
This patch adds the restoration of IRQ affinity when a pCPU is hotplugged.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/schedule.c