Skip to content

Reset PIT reinjection logic on irq unmask

Avi Kivity kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: Add CONFIG_HAVE_KVM_IRQCHIParch/ia64/kvm/Kconfig arch/powerpc/kvm/Kconfig arch/s390/kvm/Kconfig +1 more+14 -00 replies
2/3KVM: Interrupt mask notifiers for ioapicinclude/linux/kvm_host.h virt/kvm/ioapic.c virt/kvm/irq_comm.c +1 more+50 -14 replies
3/3KVM: Reset PIT irq injection logic when the PIT IRQ is unmaskedarch/x86/kvm/i8254.c arch/x86/kvm/i8254.h+16 -05 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] Reset PIT reinjection logic on irq unmask

Currently, when a guest has the pit running but masked, it will accumulate pending irq injection requests but will never ack them (as the interrupts are masked). When the interrupt is finally unmasked, the reinject logic ignores pending interrupts since it sees unacked pending irqs.

Add a notifier on irq unmasking, and use that in the PIT to clear the reinject logic.

Currently only ioapic mask notifications are implemented.

This could be used to disable the hrtimer if the guest masks the PIT and uses some other timer.

Please review.

Avi Kivity (3):
KVM: Add CONFIG_HAVE_KVM_IRQCHIP
KVM: Interrupt mask notifiers for ioapic
KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

 arch/ia64/kvm/Kconfig    |    4 ++++
 arch/powerpc/kvm/Kconfig |    3 +++
 arch/s390/kvm/Kconfig    |    3 +++
 arch/x86/kvm/Kconfig     |    4 ++++
 arch/x86/kvm/i8254.c     |   15 +++++++++++++++
 arch/x86/kvm/i8254.h     |    1 +
 include/linux/kvm_host.h |   17 +++++++++++++++++
 virt/kvm/ioapic.c        |    7 ++++++-
 virt/kvm/irq_comm.c      |   24 ++++++++++++++++++++++++
 virt/kvm/kvm_main.c      |    3 +++
 10 files changed, 80 insertions(+), 1 deletions(-)