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: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
#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