spapr/xive: Set the OS CAM line at reset
commit97c00c54449b4ff349f85c6ce409dadd1b935a7d
authorCédric Le Goater <clg@kaod.org>
Tue, 22 Oct 2019 16:38:12 +0000 (22 18:38 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 24 Oct 2019 02:34:15 +0000 (24 13:34 +1100)
treeb3accb76c31c883d2b4e93e5538981fb036d68f6
parent00d6f4db604113a88afa0b823aaa50b6d91afb9f
spapr/xive: Set the OS CAM line at reset

When a Virtual Processor is scheduled to run on a HW thread, the
hypervisor pushes its identifier in the OS CAM line. When running with
kernel_irqchip=off, QEMU needs to emulate the same behavior.

Set the OS CAM line when the interrupt presenter of the sPAPR core is
reset. This will also cover the case of hot-plugged CPUs.

This change also has the benefit to remove the use of CPU_FOREACH()
which can be unsafe.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20191022163812.330-8-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive.c
include/hw/ppc/spapr_xive.h