Skip to content

Nonatomic interrupt injection

Avi Kivity kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6KVM: Check for pending events before attempting injectionarch/x86/kvm/i8259.c arch/x86/kvm/lapic.c arch/x86/kvm/svm.c +3 more+51 -129 replies
2/6KVM: VMX: Split up vmx_complete_interrupts()arch/x86/kvm/vmx.c+27 -120 replies
3/6KVM: VMX: Move real-mode interrupt injection fixup to vmx_complete_interrupts()arch/x86/kvm/vmx.c+6 -30 replies
4/6KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and entryarch/x86/kvm/vmx.c+21 -130 replies
5/6KVM: Non-atomic interrupt injectionarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+40 -150 replies
6/6KVM: VMX: Move fixup_rmode_irq() to avoid forward declarationarch/x86/kvm/vmx.c+23 -240 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/6] Nonatomic interrupt injection

This patchset changes interrupt injection to be done from normal process context instead of interrupts disabled context. This is useful for real mode interrupt injection on Intel without the current hacks (injecting as a software interrupt of a vm86 task), reducing latencies, and later, for allowing nested virtualization code to use kvm_read_guest()/kvm_write_guest() instead of kmap() to access the guest vmcb/vmcs.

Seems to survive a hack that cancels every 16th entry, after injection has already taken place.

Note: not yet ready, hangs fairly early on AMD. Seems to work well on Intel.

Please review carefully, esp. the first patch. Any missing kvm_make_request() there may result in a hung guest.

v3: close new race between injection and entry
fix Intel real-mode injection cancellation

v2: svm support (easier than expected)
fix silly vmx warning

Avi Kivity (6):
KVM: Check for pending events before attempting injection
KVM: VMX: Split up vmx_complete_interrupts()
KVM: VMX: Move real-mode interrupt injection fixup to
vmx_complete_interrupts()
KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and
entry
KVM: Non-atomic interrupt injection
KVM: VMX: Move fixup_rmode_irq() to avoid forward declaration

 arch/x86/include/asm/kvm_host.h |    1 +
 arch/x86/kvm/i8259.c            |    1 +
 arch/x86/kvm/lapic.c            |   12 +++-
 arch/x86/kvm/svm.c              |   20 ++++++-
 arch/x86/kvm/vmx.c              |  116 ++++++++++++++++++++++++++------------
 arch/x86/kvm/x86.c              |   44 ++++++++++----
 include/linux/kvm_host.h        |    1 +
 7 files changed, 142 insertions(+), 53 deletions(-)