aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2014-01-08 05:25:28 -0500
committerAlexander Graf <agraf@suse.de>2014-01-27 10:01:13 -0500
commit5d00f66b865e3782c5852cdafe1cea11a292a81e (patch)
tree5d1fc36361174c760ab5c315b98c336fdcaf83f3 /arch/powerpc/kvm
parente0622bd9f2fccc8a801fa7aaf4fa6d7c728c3a78 (diff)
KVM: PPC: Book3S HV: Prepare for host using hypervisor doorbells
POWER8 has support for hypervisor doorbell interrupts. Though the kernel doesn't use them for IPIs on the powernv platform yet, it probably will in future, so this makes KVM cope gracefully if a hypervisor doorbell interrupt arrives while in a guest. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/book3s_hv.c1
-rw-r--r--arch/powerpc/kvm/book3s_hv_rmhandlers.S7
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index d7f2ec6f1419..216049ff7368 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -651,6 +651,7 @@ static int kvmppc_handle_exit_hv(struct kvm_run *run, struct kvm_vcpu *vcpu,
651 r = RESUME_GUEST; 651 r = RESUME_GUEST;
652 break; 652 break;
653 case BOOK3S_INTERRUPT_EXTERNAL: 653 case BOOK3S_INTERRUPT_EXTERNAL:
654 case BOOK3S_INTERRUPT_H_DOORBELL:
654 vcpu->stat.ext_intr_exits++; 655 vcpu->stat.ext_intr_exits++;
655 r = RESUME_GUEST; 656 r = RESUME_GUEST;
656 break; 657 break;
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 9e89c7577b4a..eae4ab9b9135 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1997,10 +1997,17 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_207S)
1997BEGIN_FTR_SECTION 1997BEGIN_FTR_SECTION
1998 cmpwi r6, 5 /* privileged doorbell? */ 1998 cmpwi r6, 5 /* privileged doorbell? */
1999 beq 0f 1999 beq 0f
2000 cmpwi r6, 3 /* hypervisor doorbell? */
2001 beq 3f
2000END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) 2002END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
2001 li r3, 1 /* anything else, return 1 */ 2003 li r3, 1 /* anything else, return 1 */
20020: blr 20040: blr
2003 2005
2006 /* hypervisor doorbell */
20073: li r12, BOOK3S_INTERRUPT_H_DOORBELL
2008 li r3, 1
2009 blr
2010
2004/* 2011/*
2005 * Determine what sort of external interrupt is pending (if any). 2012 * Determine what sort of external interrupt is pending (if any).
2006 * Returns: 2013 * Returns: