Skip to content

KVM: x86: Fix hard lockup with periodic timer in guest

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Applied to kvm-x86 misc, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v6 Latest4 patches 1 replyApplied

Changes in v6 from the cover letter

- Split the apic_timer_fn() change to a separate patch (mainly for a bisection point).
- Handle (and WARN on) period=0 in apic_timer_fn().
- Add a patch to grab a pointer to the kvm_timer struct locally.
- Tag the fixes (and prep work) for stable@.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86: WARN if hrtimer callback for periodic APIC timer fires with period=0arch/x86/kvm/lapic.c+1 -10 replies
2/4KVM: x86: Explicitly set new periodic hrtimer expiration in apic_timer_fn()arch/x86/kvm/lapic.c+1 -10 replies
3/4KVM: x86: Fix VM hard lockup after prolonged inactivity with periodic HV timerarch/x86/kvm/lapic.c+23 -50 replies
4/4KVM: x86: Grab lapic_timer in a local variable to cleanup periodic codearch/x86/kvm/lapic.c+8 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/4] KVM: x86: Fix hard lockup with periodic timer in guest

fuqiang's patch/series to fix a bug in KVM's local APIC timer emulation where it can trigger a hard lockup due to restarting an hrtimer with an expired deadline over and over (and over).

v6:
- Split the apic_timer_fn() change to a separate patch (mainly for a bisection point).
- Handle (and WARN on) period=0 in apic_timer_fn().
- Add a patch to grab a pointer to the kvm_timer struct locally.
- Tag the fixes (and prep work) for stable@.

v5:
- https://lore.kernel.org/all/[email protected]
- Add more details in commit messages and letters.

v4:
- https://lore.kernel.org/all/[email protected]
- merge two patch into one

v3:
- https://lore.kernel.org/all/[email protected]
- Fix: advanced SW timer (hrtimer) expiration does not catch up to current time.
- optimize the commit message of patch 2

v2:
- https://lore.kernel.org/all/[email protected]
- Added a bugfix for hardlockup in v2

v1: https://lore.kernel.org/all/[email protected]

Sean Christopherson (2):
KVM: x86: WARN if hrtimer callback for periodic APIC timer fires with
period=0
KVM: x86: Grab lapic_timer in a local variable to cleanup periodic
code

fuqiang wang (2):
KVM: x86: Explicitly set new periodic hrtimer expiration in

    apic_timer_fn()

KVM: x86: Fix VM hard lockup after prolonged inactivity with periodic
HV timer

 arch/x86/kvm/lapic.c | 44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

base-commit: 16ec4fb4ac95d878b879192d280db2baeec43272

Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog