aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPaolo Bonzini2023-03-27 10:04:07 -0400
committerPaolo Bonzini2023-03-27 10:04:07 -0400
commit9e347ba03029e10e6405f8c3a7a91a5597943ed9 (patch)
treee7c895cdcb5e516baa162376d0da80de9dcd235c /arch
parent8607daa2145f277c2548eee22e9fa45dfecd8dea (diff)
parent6eff38048944cadc3cddcf117acfa5199ec32490 (diff)
Merge tag 'kvm-riscv-fixes-6.3-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv fixes for 6.3, take #1 - Fix VM hang in case of timer delta being zero
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/kvm/vcpu_timer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/riscv/kvm/vcpu_timer.c b/arch/riscv/kvm/vcpu_timer.c
index ad34519c8a13..3ac2ff6a65da 100644
--- a/arch/riscv/kvm/vcpu_timer.c
+++ b/arch/riscv/kvm/vcpu_timer.c
@@ -147,10 +147,8 @@ static void kvm_riscv_vcpu_timer_blocking(struct kvm_vcpu *vcpu)
return;
delta_ns = kvm_riscv_delta_cycles2ns(t->next_cycles, gt, t);
- if (delta_ns) {
- hrtimer_start(&t->hrt, ktime_set(0, delta_ns), HRTIMER_MODE_REL);
- t->next_set = true;
- }
+ hrtimer_start(&t->hrt, ktime_set(0, delta_ns), HRTIMER_MODE_REL);
+ t->next_set = true;
}
static void kvm_riscv_vcpu_timer_unblocking(struct kvm_vcpu *vcpu)