diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 5f85c12b223c225843a0fc48e22d3df9a9c58d59..abfb9208ae531999cbd9d82618a43f3ddba43466 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -474,7 +474,7 @@ static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) static int stimer_set_config(struct kvm_vcpu_hv_stimer *stimer, u64 config, bool host) { - if (stimer->count == 0 || HV_STIMER_SINT(config) == 0) + if ((stimer->config & HV_STIMER_ENABLE) && HV_STIMER_SINT(config) == 0) config &= ~HV_STIMER_ENABLE; stimer->config = config; stimer_cleanup(stimer);