kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/5]  Nonatomic interrupt injection
@ 2010-08-30 12:35 Avi Kivity
  2010-08-30 12:35 ` [PATCH v5 1/5] KVM: Check for pending events before attempting injection Avi Kivity
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Avi Kivity @ 2010-08-30 12:35 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm

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.

With the PIC reset fix posted earlier, this passes autotest on both AMD and
Intel, with in-kernel irqchip.  I'll run -no-kvm-irqchip tests shortly.

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

v5: add KVM_REQ_EVENT to KVM_INTERRUPT path
    change first patch to sample KVM_REQ_EVENT before checking vcpu->requests
      for the entry abort path; improves bisectability (noticed by Gleb)

v4: add KVM_REQ_EVENT after lapic restore

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 (5):
  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

 arch/x86/include/asm/kvm_host.h |    1 +
 arch/x86/kvm/i8259.c            |    1 +
 arch/x86/kvm/lapic.c            |   13 +++++-
 arch/x86/kvm/svm.c              |   20 ++++++++-
 arch/x86/kvm/vmx.c              |   87 +++++++++++++++++++++++++++++----------
 arch/x86/kvm/x86.c              |   45 ++++++++++++++------
 include/linux/kvm_host.h        |    1 +
 7 files changed, 130 insertions(+), 38 deletions(-)


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

end of thread, other threads:[~2011-02-08 20:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 12:35 [PATCH v5 0/5] Nonatomic interrupt injection Avi Kivity
2010-08-30 12:35 ` [PATCH v5 1/5] KVM: Check for pending events before attempting injection Avi Kivity
2011-02-07  6:00   ` [regression] KVM: hangs and "irq timeout" booting HURD unless -no-kvm-irqchip passed Jonathan Nieder
2011-02-07 12:39     ` Avi Kivity
2011-02-07 12:45       ` Gleb Natapov
2011-02-07 13:27         ` Gleb Natapov
2011-02-08  1:40           ` Jonathan Nieder
2011-02-08  7:40             ` Michael Tokarev
2011-02-08 12:00             ` Gleb Natapov
2011-02-08 14:22               ` Marcelo Tosatti
2011-02-08 14:41                 ` Gleb Natapov
2011-02-08 14:43                 ` Avi Kivity
2011-02-08 14:47                   ` Gleb Natapov
2011-02-08 14:57                     ` Avi Kivity
2011-02-08 17:44                       ` Marcelo Tosatti
2011-02-08 20:40               ` Jonathan Nieder
2010-08-30 12:35 ` [PATCH v5 2/5] KVM: VMX: Split up vmx_complete_interrupts() Avi Kivity
2010-08-30 12:35 ` [PATCH v5 3/5] KVM: VMX: Move real-mode interrupt injection fixup to vmx_complete_interrupts() Avi Kivity
2010-08-30 12:35 ` [PATCH v5 4/5] KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and entry Avi Kivity
2010-08-30 12:35 ` [PATCH v5 5/5] KVM: Non-atomic interrupt injection Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).