public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/7] KVM: VMX: Add Posted Interrupt supporting
@ 2013-04-08 14:23 Yang Zhang
  2013-04-08 14:23 ` [PATCH v8 1/7] KVM: VMX: Enable acknowledge interupt on vmexit Yang Zhang
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Yang Zhang @ 2013-04-08 14:23 UTC (permalink / raw)
  To: kvm; +Cc: gleb, mtosatti, xiantao.zhang, jun.nakajima, Yang Zhang

From: Yang Zhang <yang.z.zhang@Intel.com>

The follwoing patches are adding the Posted Interrupt supporting to KVM:
The first patch enables the feature 'acknowledge interrupt on vmexit'.Since
it is required by Posted interrupt, we need to enable it firstly.

And the subsequent patches are adding the posted interrupt supporting:
Posted Interrupt allows APIC interrupts to inject into guest directly
without any vmexit.

- When delivering a interrupt to guest, if target vcpu is running,
  update Posted-interrupt requests bitmap and send a notification event
  to the vcpu. Then the vcpu will handle this interrupt automatically,
  without any software involvemnt.

- If target vcpu is not running or there already a notification event
  pending in the vcpu, do nothing. The interrupt will be handled by
  next vm entry

Changes from v7 to v8:
* Remove unused memeber 'on' from struct pi_desc.
* Register a dummy function to sync_pir_to_irr is apicv is disabled.
* Minor fixup.
* Rebase on top of KVM upstream + RTC eoi tracking patch.

Changes from v6 to v7:
* Update TMR when ioapic/lapic's id/ldr/dfr is changed. According to SDM,
  Software should not touch virual apic page when target vcpu in non-root
  mode. Obviously, set TMR when delivering interrupt is break the rule. So
  only update TMR when in target vcpu's context.
* Clear outstanding notification bit before sync pir to irr.
* Sync pit to irr before touch irr.

Changes from v5 to v6:
* Split sync_pir_to_irr into two functions one to query whether PIR is empty
  and the other to perform the sync.
* Add comments to explain how vmx_sync_pir_to_irr() work.
* Rebase on top of KVM upstream.

Yang Zhang (7):
  KVM: VMX: Enable acknowledge interupt on vmexit
  KVM: VMX: Register a new IPI for posted interrupt
  KVM: VMX: Check the posted interrupt capability
  KVM: Call common update function when ioapic entry changed.
  KVM: Set TMR when programming ioapic entry
  KVM: VMX: Add the algorithm of deliver posted interrupt
  KVM: VMX: Use posted interrupt to deliver virtual interrupt

 arch/ia64/kvm/lapic.h              |    6 -
 arch/x86/include/asm/entry_arch.h  |    4 +
 arch/x86/include/asm/hardirq.h     |    3 +
 arch/x86/include/asm/hw_irq.h      |    1 +
 arch/x86/include/asm/irq_vectors.h |    5 +
 arch/x86/include/asm/kvm_host.h    |    3 +
 arch/x86/include/asm/vmx.h         |    4 +
 arch/x86/kernel/entry_64.S         |    5 +
 arch/x86/kernel/irq.c              |   22 ++++
 arch/x86/kernel/irqinit.c          |    4 +
 arch/x86/kvm/lapic.c               |   61 +++++++----
 arch/x86/kvm/lapic.h               |    3 +
 arch/x86/kvm/svm.c                 |   12 ++
 arch/x86/kvm/vmx.c                 |  209 +++++++++++++++++++++++++++++++-----
 arch/x86/kvm/x86.c                 |   19 +++-
 include/linux/kvm_host.h           |    4 +-
 virt/kvm/ioapic.c                  |   32 ++++--
 virt/kvm/ioapic.h                  |    7 +-
 virt/kvm/irq_comm.c                |    4 +-
 virt/kvm/kvm_main.c                |    5 +-
 20 files changed, 337 insertions(+), 76 deletions(-)


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

end of thread, other threads:[~2013-04-10  9:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 14:23 [PATCH v8 0/7] KVM: VMX: Add Posted Interrupt supporting Yang Zhang
2013-04-08 14:23 ` [PATCH v8 1/7] KVM: VMX: Enable acknowledge interupt on vmexit Yang Zhang
2013-04-08 14:23 ` [PATCH v8 2/7] KVM: VMX: Register a new IPI for posted interrupt Yang Zhang
2013-04-09  7:26   ` Gleb Natapov
2013-04-10  9:31     ` Ingo Molnar
2013-04-08 14:23 ` [PATCH v8 3/7] KVM: VMX: Check the posted interrupt capability Yang Zhang
2013-04-08 14:23 ` [PATCH v8 4/7] KVM: Call common update function when ioapic entry changed Yang Zhang
2013-04-09  7:45   ` Gleb Natapov
2013-04-08 14:23 ` [PATCH v8 5/7] KVM: Set TMR when programming ioapic entry Yang Zhang
2013-04-08 14:23 ` [PATCH v8 6/7] KVM: VMX: Add the algorithm of deliver posted interrupt Yang Zhang
2013-04-09 16:31   ` Paolo Bonzini
2013-04-10  2:16     ` Zhang, Yang Z
2013-04-08 14:23 ` [PATCH v8 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt Yang Zhang
2013-04-09  8:05   ` Gleb Natapov
2013-04-09  8:55     ` Zhang, Yang Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox