Skip to content

Commit

Permalink
Merge tag 'kvm-riscv-fixes-6.3-1' of https://github.com/kvm-riscv/linux
Browse files Browse the repository at this point in the history
… into HEAD

KVM/riscv fixes for 6.3, take #1

- Fix VM hang in case of timer delta being zero
  • Loading branch information
bonzini committed Mar 27, 2023
2 parents 8607daa + 6eff380 commit 9e347ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/riscv/kvm/vcpu_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e347ba

Please sign in to comment.