[PW_SID:1100775] RISC-V: KVM: Fix timer state restore#2016
[PW_SID:1100775] RISC-V: KVM: Fix timer state restore#2016linux-riscv-bot wants to merge 1 commit into
Conversation
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. Use the restored compare value from t->next_cycles when turning the timer back on. Fixes: 3a9f66c ("RISC-V: KVM: Add timer functionality") Signed-off-by: Qiang Ma <maqianga@uniontech.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
|
Patch 1: "RISC-V: KVM: Fix timer state restore" |
PR for series 1100775 applied to workflow__riscv__fixes
Name: RISC-V: KVM: Fix timer state restore
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1100775
Version: 1