aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2014-01-08 05:25:23 -0500
committerAlexander Graf <agraf@suse.de>2014-01-27 10:01:04 -0500
commitbd3048b80caace9cf0ae9ad22b2fbb8333b44a97 (patch)
tree5842c61132aa879628890fffcba789ce1d1c77e8 /arch/powerpc/kvm/book3s_hv.c
parentca252055130b6a1affa12df94a4694c1aafc2a6c (diff)
KVM: PPC: Book3S HV: Add handler for HV facility unavailable
At present this should never happen, since the host kernel sets HFSCR to allow access to all facilities. It's better to be prepared to handle it cleanly if it does ever happen, though. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r--arch/powerpc/kvm/book3s_hv.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 5b08ddf91d2d..1bf681e8a05f 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -706,7 +706,16 @@ static int kvmppc_handle_exit_hv(struct kvm_run *run, struct kvm_vcpu *vcpu,
706 * we don't emulate any guest instructions at this stage. 706 * we don't emulate any guest instructions at this stage.
707 */ 707 */
708 case BOOK3S_INTERRUPT_H_EMUL_ASSIST: 708 case BOOK3S_INTERRUPT_H_EMUL_ASSIST:
709 kvmppc_core_queue_program(vcpu, 0x80000); 709 kvmppc_core_queue_program(vcpu, SRR1_PROGILL);
710 r = RESUME_GUEST;
711 break;
712 /*
713 * This occurs if the guest (kernel or userspace), does something that
714 * is prohibited by HFSCR. We just generate a program interrupt to
715 * the guest.
716 */
717 case BOOK3S_INTERRUPT_H_FAC_UNAVAIL:
718 kvmppc_core_queue_program(vcpu, SRR1_PROGILL);
710 r = RESUME_GUEST; 719 r = RESUME_GUEST;
711 break; 720 break;
712 default: 721 default: