summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_emulate.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-29 16:48:44 +0200
committerAlexander Graf <agraf@suse.de>2014-05-30 14:26:22 +0200
commit616dff86028298dbc91174fb3d12b8ed8cd74955 (patch)
tree91a545abcc3b8cf70040a333a6404bcfa79f5acb /arch/powerpc/kvm/book3s_emulate.c
parenta5948fa092a04dfd6b9ee31c99eb6896c158eb08 (diff)
downloadlinux-616dff86028298dbc91174fb3d12b8ed8cd74955.tar.bz2
KVM: PPC: Book3S PR: Handle Facility interrupt and FSCR
POWER8 introduced a new interrupt type called "Facility unavailable interrupt" which contains its status message in a new register called FSCR. Handle these exits and try to emulate instructions for unhandled facilities. Follow-on patches enable KVM to expose specific facilities into the guest. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_emulate.c')
-rw-r--r--arch/powerpc/kvm/book3s_emulate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
index 0a1de29a4caf..e8133e5e89c6 100644
--- a/arch/powerpc/kvm/book3s_emulate.c
+++ b/arch/powerpc/kvm/book3s_emulate.c
@@ -438,6 +438,9 @@ int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val)
case SPRN_GQR7:
to_book3s(vcpu)->gqr[sprn - SPRN_GQR0] = spr_val;
break;
+ case SPRN_FSCR:
+ vcpu->arch.fscr = spr_val;
+ break;
case SPRN_ICTC:
case SPRN_THRM1:
case SPRN_THRM2:
@@ -545,6 +548,9 @@ int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val
case SPRN_GQR7:
*spr_val = to_book3s(vcpu)->gqr[sprn - SPRN_GQR0];
break;
+ case SPRN_FSCR:
+ *spr_val = vcpu->arch.fscr;
+ break;
case SPRN_THRM1:
case SPRN_THRM2:
case SPRN_THRM3: