From: Yang Zhang <yang.z.zhang@intel.com>
To: kvm@vger.kernel.org
Cc: gleb@redhat.com, mtosatti@redhat.com, xiantao.zhang@intel.com,
Yang Zhang <yang.z.zhang@Intel.com>
Subject: [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting
Date: Fri, 15 Mar 2013 21:31:06 +0800 [thread overview]
Message-ID: <1363354271-25302-1-git-send-email-yang.z.zhang@intel.com> (raw)
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
NOTE: We don't turn on the Posted Interrupt until the coalesced issue is
solved.
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.
Changes from v4 to v5:
* Add per cpu count for posted IPI handler.
* Dont' check irr when delivering interrupt. Since we can not get interrupt
coalesced info with Posted Interrupt. So there is no need to check the irr.
There is another patch will changed current interrupt coalesced logic. Before
it, we will not turn on Posted Interrupt.
* Clear outstanding notification bit after call local_irq_disable, but before
check request. As Marcelo suggested, we can ensure the IPI not lost in this
way
* Remove the spinlock. Same as item 2, if not need to get coalesced info, then no
need the lock.
* Rebase on top of KVM upstream.
Yang Zhang (5):
KVM: VMX: Enable acknowledge interupt on vmexit
KVM: VMX: Register a new IPI for posted interrupt
KVM: VMX: Check the posted interrupt capability
KVM: VMX: Add the algorithm of deliver posted interrupt
KVM : VMX: Use posted interrupt to deliver virtual interrupt
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 | 5 +
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/irq.c | 3 +-
arch/x86/kvm/lapic.c | 29 ++++-
arch/x86/kvm/lapic.h | 2 +
arch/x86/kvm/svm.c | 30 +++++
arch/x86/kvm/vmx.c | 223 ++++++++++++++++++++++++++++++++----
arch/x86/kvm/x86.c | 8 +-
virt/kvm/kvm_main.c | 1 +
16 files changed, 320 insertions(+), 29 deletions(-)
next reply other threads:[~2013-03-15 13:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 13:31 Yang Zhang [this message]
2013-03-15 13:31 ` [PATCH v6 1/5] KVM: VMX: Enable acknowledge interupt on vmexit Yang Zhang
2013-03-15 13:31 ` [PATCH v6 2/5] KVM: VMX: Register a new IPI for posted interrupt Yang Zhang
2013-03-15 13:31 ` [PATCH v6 3/5] KVM: VMX: Check the posted interrupt capability Yang Zhang
2013-03-15 13:31 ` [PATCH v6 4/5] KVM: VMX: Add the algorithm of deliver posted interrupt Yang Zhang
2013-03-15 13:31 ` [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt Yang Zhang
2013-03-19 8:54 ` Gleb Natapov
2013-03-19 12:11 ` Zhang, Yang Z
2013-03-19 12:23 ` Gleb Natapov
2013-03-19 12:42 ` Zhang, Yang Z
2013-03-19 13:29 ` Gleb Natapov
2013-03-19 13:59 ` Zhang, Yang Z
2013-03-19 14:51 ` Gleb Natapov
2013-03-19 15:12 ` Gleb Natapov
2013-03-19 15:19 ` Marcelo Tosatti
2013-03-19 15:27 ` Marcelo Tosatti
2013-03-19 16:10 ` Gleb Natapov
2013-03-20 11:47 ` Zhang, Yang Z
2013-03-20 11:49 ` Gleb Natapov
2013-03-20 11:52 ` Zhang, Yang Z
2013-03-19 15:30 ` Gleb Natapov
2013-03-19 15:13 ` Marcelo Tosatti
2013-03-19 15:21 ` Gleb Natapov
2013-03-19 15:03 ` Marcelo Tosatti
2013-03-19 15:18 ` Gleb Natapov
2013-03-18 2:49 ` [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting Zhang, Yang Z
2013-03-18 9:16 ` Gleb Natapov
2013-03-18 10:43 ` Zhang, Yang Z
2013-03-18 11:28 ` Gleb Natapov
2013-03-18 11:44 ` Zhang, Yang Z
2013-03-18 22:20 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363354271-25302-1-git-send-email-yang.z.zhang@intel.com \
--to=yang.z.zhang@intel.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiantao.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox