As per specification the decrementer interrupt not happen when DEC is written with 0. So we should not start hrtimer with timeout = 0 as well. Signed-off-by: Bharat Bhushan <bharat.bhushan@xxxxxxxxxxxxx> --- arch/powerpc/kvm/emulate.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 141dce3..8af3bad 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -70,14 +70,14 @@ #define OP_STHU 45 #ifdef CONFIG_PPC_BOOK3S -static int kvmppc_dec_enabled(struct kvm_vcpu *vcpu) +static bool kvmppc_dec_enabled(struct kvm_vcpu *vcpu) { - return 1; + return true; } #else -static int kvmppc_dec_enabled(struct kvm_vcpu *vcpu) +static bool kvmppc_dec_enabled(struct kvm_vcpu *vcpu) { - return vcpu->arch.tcr & TCR_DIE; + return (vcpu->arch.tcr & TCR_DIE) && !vcpu->arch.dec; } #endif -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html