Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7401f626 authored by Bharat Bhushan's avatar Bharat Bhushan Committed by Avi Kivity
Browse files

KVM: PPC: booke: Do Not start decrementer when SPRN_DEC set 0



As per specification the decrementer interrupt not happen when DEC is written
with 0. Also when DEC is zero, no decrementer running. So we should not start
hrtimer for decrementer when DEC = 0.

Signed-off-by: default avatarBharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent dc2babfe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -77,7 +77,8 @@ static int kvmppc_dec_enabled(struct kvm_vcpu *vcpu)
#else
static int kvmppc_dec_enabled(struct kvm_vcpu *vcpu)
{
	return vcpu->arch.tcr & TCR_DIE;
	/* On BOOKE, DEC = 0 is as good as decrementer not enabled */
	return (vcpu->arch.tcr & TCR_DIE) && vcpu->arch.dec;
}
#endif