diff options
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r-- | arch/x86/kvm/hyperv.c | 9 |
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, | |||
526 | new_config.enable = 0; | 526 | new_config.enable = 0; |
527 | stimer->config.as_uint64 = new_config.as_uint64; | 527 | stimer->config.as_uint64 = new_config.as_uint64; |
528 | 528 | ||
529 | stimer_mark_pending(stimer, false); | 529 | if (stimer->config.enable) |
530 | stimer_mark_pending(stimer, false); | ||
531 | |||
530 | return 0; | 532 | return 0; |
531 | } | 533 | } |
532 | 534 | ||
@@ -542,7 +544,10 @@ static int stimer_set_count(struct kvm_vcpu_hv_stimer *stimer, u64 count, | |||
542 | stimer->config.enable = 0; | 544 | stimer->config.enable = 0; |
543 | else if (stimer->config.auto_enable) | 545 | else if (stimer->config.auto_enable) |
544 | stimer->config.enable = 1; | 546 | stimer->config.enable = 1; |
545 | stimer_mark_pending(stimer, false); | 547 | |
548 | if (stimer->config.enable) | ||
549 | stimer_mark_pending(stimer, false); | ||
550 | |||
546 | return 0; | 551 | return 0; |
547 | } | 552 | } |
548 | 553 | ||