[PATCH] RISC-V: KVM: Fix timer state restore
patchwork-bot+linux-riscv at kernel.org
patchwork-bot+linux-riscv at kernel.org
Fri Jun 26 01:21:22 PDT 2026
Hello:
This patch was applied to riscv/linux.git (fixes)
by Anup Patel <anup at brainfault.org>:
On Tue, 26 May 2026 15:55:44 +0800 you wrote:
> The KVM_REG_RISCV_TIMER_REG(state) one-reg write passes the value
> written by userspace to kvm_riscv_vcpu_timer_next_event() when
> re-enabling the timer.
>
> That value is the timer state, KVM_RISCV_TIMER_STATE_ON, not the
> timer compare value. During migration or state restore, userspace
> restores the compare register separately, which stores the target
> cycle in t->next_cycles. Re-arming the timer with the state value
> schedules the next event at cycle 1 instead of the restored compare
> value, causing the virtual timer to fire too early.
>
> [...]
Here is the summary with links:
- RISC-V: KVM: Fix timer state restore
https://git.kernel.org/riscv/c/6d4c17ed5620
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the kvm-riscv
mailing list