aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/hyperv.c
diff options
context:
space:
mode:
authorLinus Walleij2019-04-08 13:03:09 +0200
committerLinus Walleij2019-04-08 13:03:09 +0200
commit26af34079f1d8299932303cfd2b376b9cf55a35c (patch)
treef1a9824855fae569aa51c2109a5929715143093d /arch/x86/kvm/hyperv.c
parent27157af66324d529b43231c12b5d1e1a3e9fa620 (diff)
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
Merge tag 'v5.1-rc3' into devel
Linux 5.1-rc3
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r--arch/x86/kvm/hyperv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 27c43525a05f..421899f6ad7b 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -526,7 +526,9 @@ static int stimer_set_config(struct kvm_vcpu_hv_stimer *stimer, u64 config,
new_config.enable = 0;
stimer->config.as_uint64 = new_config.as_uint64;
- stimer_mark_pending(stimer, false);
+ if (stimer->config.enable)
+ stimer_mark_pending(stimer, false);
+
return 0;
}
@@ -542,7 +544,10 @@ static int stimer_set_count(struct kvm_vcpu_hv_stimer *stimer, u64 count,
stimer->config.enable = 0;
else if (stimer->config.auto_enable)
stimer->config.enable = 1;
- stimer_mark_pending(stimer, false);
+
+ if (stimer->config.enable)
+ stimer_mark_pending(stimer, false);
+
return 0;
}