Skip to contentSkip to conversation

powerpc/powernv: Properly set "host-ipi" on IPIs

PATCH Applied Benjamin Herrenschmidt 3 participants 3 messages Feb 7, 2017 – Feb 9, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 powerpc/powernv: Properly set "host-ipi" on IPIs

Otherwise KVM will fail to pass them through to the host

---
 arch/powerpc/sysdev/xics/icp-opal.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/sysdev/xics/icp-opal.c +4 -2
index c96c0cb..f9670ea 100644
@@ -120,14 +120,16 @@ static void icp_opal_cause_ipi(int cpu, unsigned long data)
 {
 	int hw_cpu = get_hard_smp_processor_id(cpu);
 
+	kvmppc_set_host_ipi(cpu, 1);
 	opal_int_set_mfrr(hw_cpu, IPI_PRIORITY);
 }
 
 static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id)
 {
-	int hw_cpu = hard_smp_processor_id();
+	int cpu = smp_processor_id();
 
-	opal_int_set_mfrr(hw_cpu, 0xff);
+	kvmppc_set_host_ipi(cpu, 0);
+	opal_int_set_mfrr(get_hard_smp_processor_id(cpu), 0xff);
 
 	return smp_ipi_demux();
 }
#1 lore raw
Quoted 1 line · Benjamin Herrenschmidt

Otherwise KVM will fail to pass them through to the host

OK, so this is:

Fixes d74361881f0d ("powerpc/xics: Add ICP OPAL backend")

But seeing as the KVM support is only going into v4.11, I won't tag it for stable.

Paul do you want me to put this in the topic branch?

cheers