[PATCH v4 0/2] KVM: VMX: Add Posted Interrupt supporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yang Zhang <yang.z.zhang@xxxxxxxxx>

The two 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 second patch is adding the posted interrupt supporting.

Please see the comments in the two patch to get more details.

Changes from v3 to v4:
* Clear up the vmx_handle_external_interrupt() to make the code more cleanliness
  and clear.
* Use lock to protect the access of pir.
* Check pending interrupt in pir firstly in vmx_deliver_posted_interrupt().
  Since hardware will sync pir->irr, if check irr firstly, then the irr may
  be modified after the checking, and we also cannot see it in the following
  check of pir.
* Wrap the operation of sync pir to irr to a function kvm_apic_update_irr(),
  and call it from vmx_sync_pir_to_irr.
* Use irr |= pir directly instead using cmpxchg. Since hardware cannot perform
  pir->irr at this point, so it is safe to use 'or' to sync pir to irr.

Changes from v2 to v3:
* Add CONFIG_HAVE_KVM check when calling BUILD_INTERRUPT for posted interrupt.
* Rename send_notification_event() to deliver_posted_interrupt().
* Modify the algorithm of calculating interrupt coalescence: interrupt will be
  considered as delivered only when there is no previous interrupt pending in
  both irr and pir.
* Remove using new request to sync pir to irr, use KVM_REQ_EVENT for instead.
* Remove the optimization of checking outsanding notification bit after sending
  posted interrupt to remote cpu.
* Embed pi_desc inside struct vmx instead allocating it dynamically.
* Rebase on top of KVM upstream.



Yang Zhang (2):
  KVM: VMX: enable acknowledge interupt on vmexit
  KVM: VMX: Add Posted Interrupt supporting

 arch/x86/include/asm/entry_arch.h  |    4 +
 arch/x86/include/asm/hw_irq.h      |    1 +
 arch/x86/include/asm/irq_vectors.h |    5 +
 arch/x86/include/asm/kvm_host.h    |    4 +
 arch/x86/include/asm/vmx.h         |    4 +
 arch/x86/kernel/entry_64.S         |    5 +
 arch/x86/kernel/irq.c              |   20 ++++
 arch/x86/kernel/irqinit.c          |    4 +
 arch/x86/kvm/lapic.c               |   32 +++++-
 arch/x86/kvm/lapic.h               |    2 +
 arch/x86/kvm/svm.c                 |   19 +++
 arch/x86/kvm/vmx.c                 |  219 ++++++++++++++++++++++++++++++++----
 arch/x86/kvm/x86.c                 |    5 +-
 13 files changed, 296 insertions(+), 28 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux