Skip to contentSkip to conversation

Patch "KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Sep 17, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kvm-ppc-book3s-hv-exit-on-h_doorbell-if-host_ipi-is-set.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 06554d9f6cc8f0b5ec903db19726a15dfc7b09d6 Mon Sep 17 00:00:00 2001

From: "Gautham R. Shenoy" <[email protected]>
Date: Fri, 7 Aug 2015 17:41:20 +0530
Subject: KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set

From: "Gautham R. Shenoy" <[email protected]>

commit 06554d9f6cc8f0b5ec903db19726a15dfc7b09d6 upstream.

The code that handles the case when we receive a H_DOORBELL interrupt has a comment which says "Hypervisor doorbell - exit only if host IPI flag set". However, the current code does not actually check if the host IPI flag is set. This is due to a comparison instruction that got missed.

As a result, the current code performs the exit to host only if some sibling thread or a sibling sub-core is exiting to the host. This implies that, an IPI sent to a sibling core in (subcores-per-core != 1) mode will be missed by the host unless the sibling core is on the exit path to the host.

This patch adds the missing comparison operation which will ensure that when HOST_IPI flag is set, we unconditionally exit to the host.

---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S |    1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -0
@@ -1127,6 +1127,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 	cmpwi	r12, BOOK3S_INTERRUPT_H_DOORBELL
 	bne	3f
 	lbz	r0, HSTATE_HOST_IPI(r13)
+	cmpwi	r0, 0
 	beq	4f
 	b	guest_exit_cont
 3:

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/kvm-ppc-book3s-hv-exit-on-h_doorbell-if-host_ipi-is-set.patch