Skip to content

KVM: VMX: Add Posted Interrupt supporting

Yang Zhang kvm 13 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest7 patches 8 repliesApplied
  2. v97 patches 6 repliesSuperseded
  3. v87 patches 7 repliesSuperseded
Earlier versions · 10
VersionPostedPatchesRepliesStatus
v77 patches9 repliesSuperseded
v65 patches25 repliesSuperseded
v55 patches13 repliesSuperseded
v4 posting 2/22 patches43 repliesSuperseded
v3 posting 2/22 patches13 repliesSuperseded
v2 posting 2/22 patches4 repliesSuperseded
v4 posting 1/21 patch2 repliesSuperseded
v3 posting 1/21 patch4 repliesSuperseded
v2 posting 1/21 patch4 repliesSuperseded
v11 patch4 repliesSuperseded

Changes in v10 from the cover letter

* Only check kvm_apic_hw_enable() in vcpu_sacn_ioapic().
* Remove repeated tracing in __apic_accept_irq().
* Rebase on top of KVM upstream + RTC eoi tracking patch.

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/7KVM: VMX: Enable acknowledge interupt on vmexitarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+64 -50 replies
2/7KVM: VMX: Register a new IPI for posted interruptarch/x86/include/asm/entry_arch.h arch/x86/include/asm/hardirq.h arch/x86/include/asm/hw_irq.h +4 more+44 -00 replies
3/7KVM: VMX: Check the posted interrupt capabilityarch/x86/include/asm/vmx.h arch/x86/kvm/vmx.c+66 -200 replies
4/7KVM: Call common update function when ioapic entry changed.arch/ia64/kvm/lapic.h arch/x86/kvm/lapic.c arch/x86/kvm/vmx.c +6 more+32 -300 replies
5/7KVM: Set TMR when programming ioapic entryarch/x86/kvm/lapic.c arch/x86/kvm/lapic.h arch/x86/kvm/x86.c +2 more+25 -110 replies
6/7KVM: VMX: Add the algorithm of deliver posted interruptarch/x86/include/asm/kvm_host.h arch/x86/kvm/lapic.c arch/x86/kvm/lapic.h +3 more+86 -10 replies
7/7KVM: VMX: Use posted interrupt to deliver virtual interruptarch/x86/kvm/lapic.c arch/x86/kvm/vmx.c arch/x86/kvm/x86.c+21 -126 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIngo MolnarGleb Natapov
SeriesR-b
1/7
2/7A-b
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 0/7] KVM: VMX: Add Posted Interrupt supporting

From: Yang Zhang <[email protected]>

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 v9 to v10:
* Only check kvm_apic_hw_enable() in vcpu_sacn_ioapic().
* Remove repeated tracing in __apic_accept_irq().
* Rebase on top of KVM upstream + RTC eoi tracking patch.

Changes from v8 to v9:
* Add tracing in PI case when deliver interrupt.
* Scan ioapic when updating SPIV register.
* Rebase on top of KVM upstream + RTC eoi tracking patch.

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.

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               |   58 +++++++---
 arch/x86/kvm/lapic.h               |    2 +
 arch/x86/kvm/svm.c                 |   12 ++
 arch/x86/kvm/vmx.c                 |  207 +++++++++++++++++++++++++++++++-----
 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, 333 insertions(+), 74 deletions(-)