diff options
author | Paul Mackerras <paulus@samba.org> | 2014-01-08 05:25:28 -0500 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-01-27 10:01:13 -0500 |
commit | 5d00f66b865e3782c5852cdafe1cea11a292a81e (patch) | |
tree | 5d1fc36361174c760ab5c315b98c336fdcaf83f3 /arch/powerpc/kvm | |
parent | e0622bd9f2fccc8a801fa7aaf4fa6d7c728c3a78 (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.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 7 |
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) | |||
1997 | BEGIN_FTR_SECTION | 1997 | BEGIN_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 | ||
2000 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) | 2002 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) |
2001 | li r3, 1 /* anything else, return 1 */ | 2003 | li r3, 1 /* anything else, return 1 */ |
2002 | 0: blr | 2004 | 0: blr |
2003 | 2005 | ||
2006 | /* hypervisor doorbell */ | ||
2007 | 3: 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: |