Skip to content

Commit

Permalink
powerpc/xive: Clear XIVE internal structures when a CPU is removed
Browse files Browse the repository at this point in the history
Commit eac1e73 ("powerpc/xive: guest exploitation of the XIVE
interrupt controller") introduced support for the XIVE exploitation
mode of the P9 interrupt controller on the pseries platform.

At that time, support for CPU removal was not complete on PowerVM and
CPU hot unplug remained untested. It appears that some cleanups of the
XIVE internal structures are required before releasing the CPU,
without which the kernel crashes in a RTAS call doing the CPU
isolation.

These changes fix the crash by deconfiguring the IPI interrupt source
and clearing the event queues of the CPU when it is removed.

Fixes: eac1e73 ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
legoater authored and mpe committed Oct 4, 2017
1 parent 74f1282 commit cc56939
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/powerpc/sysdev/xive/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,14 @@ void xive_teardown_cpu(void)

if (xive_ops->teardown_cpu)
xive_ops->teardown_cpu(cpu, xc);

#ifdef CONFIG_SMP
/* Get rid of IPI */
xive_cleanup_cpu_ipi(cpu, xc);
#endif

/* Disable and free the queues */
xive_cleanup_cpu_queues(cpu, xc);
}

void xive_kexec_teardown_cpu(int secondary)
Expand Down

0 comments on commit cc56939

Please sign in to comment.