All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] LoongArch: KVM: Fix timer restore issues
@ 2026-07-15 10:06 Tao Cui
  2026-07-15 10:06 ` [PATCH v3 1/2] LoongArch: KVM: Reload one-shot TVAL on migration destination Tao Cui
  2026-07-15 10:06 ` [PATCH v3 2/2] LoongArch: KVM: Prevent division by zero in periodic timer restore Tao Cui
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Cui @ 2026-07-15 10:06 UTC (permalink / raw)
  To: zhaotianrui, maobibo
  Cc: chenhuacai, kernel, kvm, loongarch, linux-kernel, lixianglai,
	cuitao, cui.tao

From: Tao Cui <cuitao@kylinos.cn>

Fix two issues in kvm_restore_timer():

Patch 1 fixes a one-shot timer firing immediately after migration because
vcpu->arch.expire is not migrated.

Patch 2 fixes a division-by-zero crash when a guest programs a periodic
timer with a period value of zero.

Both are in the same function (kvm_restore_timer) and are sent as a
series for convenience.

Tao Cui (2):
  LoongArch: KVM: Reload one-shot TVAL on migration destination
  LoongArch: KVM: Prevent division by zero in periodic timer restore

 arch/loongarch/kvm/timer.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

---
Changes in v3:
- Add patch 2 (division by zero fix, found by Sashiko AI review).
- Reuse the existing now timestamp instead of a redundant ktime_get().

Changes in v2:
- Move the expire check before ktime_before() (suggested by Bibo Mao)
- Remove the old else-if branch that was one-shot only.
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-15 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 10:06 [PATCH v3 0/2] LoongArch: KVM: Fix timer restore issues Tao Cui
2026-07-15 10:06 ` [PATCH v3 1/2] LoongArch: KVM: Reload one-shot TVAL on migration destination Tao Cui
2026-07-15 10:06 ` [PATCH v3 2/2] LoongArch: KVM: Prevent division by zero in periodic timer restore Tao Cui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.