summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/booke.c
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2012-05-21 03:21:23 +0400
committerAlexander Graf <agraf@suse.de>2012-05-30 13:43:11 +0400
commit21bd000abff7d587229dbbee6f8c17f3aad9f9d8 (patch)
tree23bc78396196e5253e3330f03cf2eecb41a067b3 /arch/powerpc/kvm/booke.c
parent32fad281c0680ed0ccade7dda85a2121cf9b1d06 (diff)
downloadlinux-21bd000abff7d587229dbbee6f8c17f3aad9f9d8.tar.xz
KVM: PPC: booke: Added DECAR support
Added the decrementer auto-reload support. DECAR is readable on e500v2/e500mc and later cpus. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r--arch/powerpc/kvm/booke.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 72f13f4a06e0..86681eec60b1 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1267,6 +1267,11 @@ void kvmppc_decrementer_func(unsigned long data)
{
struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data;
+ if (vcpu->arch.tcr & TCR_ARE) {
+ vcpu->arch.dec = vcpu->arch.decar;
+ kvmppc_emulate_dec(vcpu);
+ }
+
kvmppc_set_tsr_bits(vcpu, TSR_DIS);
}