Skip to content

interrupt injection rework

Gleb Natapov kvm 2 versions – Applied

Status from this message: Applied all, thanks for this excellent patchset.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 9 repliesApplied
  2. v115 patches 79 repliesSuperseded

Changes in v2 from the cover letter

Fix SVM NMI injection. IRET intercept should be activated at NMI injection time. Update NMI injection statistics. Don't exit to userspace on IRET intercept.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/16Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too.arch/x86/kvm/irq.c arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+25 -150 replies
2/16Consolidate userspace and kernel interrupt injection for VMX.arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+19 -580 replies
3/16Cleanup vmx_intr_assist()arch/x86/kvm/vmx.c+30 -250 replies
4/16Use kvm_arch_interrupt_allowed() instead of checking interrupt_window_open directlyarch/x86/kvm/x86.c+2 -30 replies
5/16Coalesce userspace/kernel irqchip interrupt injection logic.arch/x86/kvm/svm.c+75 -1011 reply
6/16Use EVENTINJ to inject interrupts.arch/x86/kvm/svm.c+9 -30 replies
7/16Remove exception_injected() callback.arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+0 -150 replies
8/16Remove inject_pending_vectors() callback.arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+1 -70 replies
9/16kvm_push_irq() no longer used.arch/x86/kvm/x86.h+0 -70 replies
10/16sync_lapic_to_cr8() should always sync cr8 to V_TPR.arch/x86/kvm/svm.c+1 -40 replies
11/16Do not report TPR write to userspace if new value bigger or equal to a previous one.arch/x86/kvm/svm.c arch/x86/kvm/vmx.c+16 -70 replies
12/16Get rid of arch.interrupt_window_open & arch.nmi_window_openarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c+12 -310 replies
13/16Add NMI injection support to SVM.arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c+49 -20 replies
14/16Move interrupt injection logic to x86.carch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+120 -1310 replies
15/16Fix userspace IRQ chip migration.arch/x86/kvm/x86.c+6 -60 replies
16/16Get rid of get_irq() callback.arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+5 -240 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 00/16] interrupt injection rework

Hi,

This patch series aims to consolidate IRQ injection code for in kernel IRQ chip and userspace one. Also to move IRQ injection logic from SVM/VMX specific code to x86.c.

Changelog:
v2:
Fix SVM NMI injection. IRET intercept should be activated at NMI injection time. Update NMI injection statistics. Don't exit to userspace on IRET intercept.

Gleb Natapov (16):
Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too. Consolidate userspace and kernel interrupt injection for VMX. Cleanup vmx_intr_assist()
Use kvm_arch_interrupt_allowed() instead of checking
interrupt_window_open directly
Coalesce userspace/kernel irqchip interrupt injection logic. Use EVENTINJ to inject interrupts.
Remove exception_injected() callback.
Remove inject_pending_vectors() callback.
kvm_push_irq() no longer used.
sync_lapic_to_cr8() should always sync cr8 to V_TPR.
Do not report TPR write to userspace if new value bigger or equal to
a previous one.
Get rid of arch.interrupt_window_open & arch.nmi_window_open Add NMI injection support to SVM.
Move interrupt injection logic to x86.c
Fix userspace IRQ chip migration.
Get rid of get_irq() callback.

 arch/x86/include/asm/kvm_host.h |   14 +-
 arch/x86/kvm/irq.c              |    7 +
 arch/x86/kvm/svm.c              |  253 +++++++++++++++++----------------------
 arch/x86/kvm/vmx.c              |  184 +++++++----------------------
 arch/x86/kvm/x86.c              |  102 +++++++++++++----
 arch/x86/kvm/x86.h              |    7 -
 6 files changed, 249 insertions(+), 318 deletions(-)