summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_emulate.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2014-06-05 17:38:05 +0530
committerAlexander Graf <agraf@suse.de>2014-07-28 15:22:10 +0200
commit06da28e76b87331ebccdb6d486cfd94835b8be5e (patch)
tree151e895b815cdb3f5b8039f41073052a615f9cd4 /arch/powerpc/kvm/book3s_emulate.c
parent8f42ab2749d00ea15157ab896cfbed73a247b3e1 (diff)
downloadop-kernel-dev-06da28e76b87331ebccdb6d486cfd94835b8be5e.zip
op-kernel-dev-06da28e76b87331ebccdb6d486cfd94835b8be5e.tar.gz
KVM: PPC: BOOK3S: PR: Emulate instruction counter
Writing to IC is not allowed in the privileged mode. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
index 1bb16a5..84fddcd 100644
--- a/arch/powerpc/kvm/book3s_emulate.c
+++ b/arch/powerpc/kvm/book3s_emulate.c
@@ -580,6 +580,9 @@ int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val
case SPRN_VTB:
*spr_val = vcpu->arch.vtb;
break;
+ case SPRN_IC:
+ *spr_val = vcpu->arch.ic;
+ break;
case SPRN_GQR0:
case SPRN_GQR1:
case SPRN_GQR2:
OpenPOWER on IntegriCloud