All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: "Wu, Feng" <feng.wu@intel.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v9 01/17] VT-d Posted-intterrupt (PI) design
Date: Tue, 24 Nov 2015 06:34:58 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D15F71B817@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1446540207-4806-2-git-send-email-feng.wu@intel.com>

> From: Wu, Feng
> Sent: Tuesday, November 03, 2015 4:43 PM
> 
> 
> diff --git a/docs/misc/vtd-pi.txt b/docs/misc/vtd-pi.txt
> new file mode 100644
> index 0000000..f9b4637
> --- /dev/null
> +++ b/docs/misc/vtd-pi.txt
> @@ -0,0 +1,329 @@
> +Authors: Feng Wu <feng.wu@intel.com>
> +
> +VT-d Posted-interrupt (PI) design for XEN
> +
> +Background
> +==========
> +With the development of virtualization, there are more and more device
> +assignment requirements. However, today when a VM is running with
> +assigned devices (such as, NIC), external interrupt handling for the assigned
> +devices always needs VMM intervention.
> +
> +VT-d Posted-interrupt is a more enhanced method to handle interrupts
> +in the virtualization environment. Interrupt posting is the process by
> +which an interrupt request is recorded in a memory-resident
> +posted-interrupt-descriptor structure by the root-complex, followed by
> +an optional notification event issued to the CPU complex.

Some clarification required here. Is "Interrupt Posting" only used to
represent the process of VT-d Posted-interrupt, or also for CPU-side
posting through IPI? From above context, and later explanation about
"Processor Support" and "Root-complex Support", looks the former
is true. Then how do we call CPU-side posting?

I think a one-sentence definition about those terms in the start would
be helpful.

> +
> +With VT-d Posted-interrupt we can get the following advantages:
> +- Direct delivery of external interrupts to running vCPUs without VMM
> +intervention
> +- Decrease the interrupt migration complexity. On vCPU migration, software
> +can atomically co-migrate all interrupts targeting the migrating vCPU. For
> +virtual machines with assigned devices, migrating a vCPU across pCPUs
> +either incurs the overhead of forwarding interrupts in software (e.g. via VMM
> +generated IPIs), or complexity to independently migrate each interrupt targeting
> +the vCPU to the new pCPU. However, after enabling VT-d PI, the destination vCPU
> +of an external interrupt from assigned devices is stored in the IRTE (i.e.
> +Posted-interrupt Descriptor Address), when vCPU is migrated to another pCPU,
> +we will set this new pCPU in the 'NDST' filed of Posted-interrupt descriptor, this
> +make the interrupt migration automatic.
> +
> +Here is what Xen currently does for external interrupts from assigned devices:
> +
> +When a VM is running and an external interrupt from an assigned device occurs
> +for it. VM-EXIT happens, then:
> +
> +vmx_do_extint() --> do_IRQ() --> __do_IRQ_guest() --> hvm_do_IRQ_dpci() -->
> +raise_softirq_for(pirq_dpci) --> raise_softirq(HVM_DPCI_SOFTIRQ)
> +
> +softirq HVM_DPCI_SOFTIRQ is bound to dpci_softirq()
> +
> +dpci_softirq() --> hvm_dirq_assist() --> vmsi_deliver_pirq() --> vmsi_deliver() -->
> +vmsi_inj_irq() --> vlapic_set_irq()
> +
> +vlapic_set_irq() does the following things:
> +1. If CPU-side posted-interrupt is supported, call vmx_deliver_posted_intr() to deliver
> +the virtual interrupt via posted-interrupt infrastructure.
> +2. Else if CPU-side posted-interrupt is not supported, set the related vIRR in vLAPIC
> +page and call vcpu_kick() to kick the related vCPU. Before VM-Entry, vmx_intr_assist()
> +will help to inject the interrupt to guests.
> +
> +However, after VT-d PI is supported, when a guest is running in non-root and an
> +external interrupt from an assigned device occurs for it. No VM-Exit is needed,

". No VM-Exit ..." -> ", no VM-Exit..."

> +the guest can handle this totally in non-root mode, thus avoiding all the above
> +code flow.
> +
> +Posted-interrupt Introduction
> +========================
> +There are two components to the Posted-interrupt architecture:

"to the" -> "in the"


Thanks
Kevin

  parent reply	other threads:[~2015-11-24  6:34 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03  8:43 [PATCH v9 00/17] Add VT-d Posted-Interrupts support Feng Wu
2015-11-03  8:43 ` [PATCH v9 01/17] VT-d Posted-intterrupt (PI) design Feng Wu
2015-11-10 14:52   ` Dario Faggioli
2015-11-24  6:34     ` Tian, Kevin
2015-11-24  6:34   ` Tian, Kevin [this message]
2015-11-24  6:49     ` Wu, Feng
2015-11-03  8:43 ` [PATCH v9 02/17] Add cmpxchg16b support for x86-64 Feng Wu
2015-11-03  8:43 ` [PATCH v9 03/17] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature Feng Wu
2015-11-03  8:43 ` [PATCH v9 04/17] vt-d: VT-d Posted-Interrupts feature detection Feng Wu
2015-11-24  7:14   ` Tian, Kevin
2015-11-03  8:43 ` [PATCH v9 05/17] vmx: Extend struct pi_desc to support VT-d Posted-Interrupts Feng Wu
2015-11-03  8:43 ` [PATCH v9 06/17] vmx: Add some helper functions for Posted-Interrupts Feng Wu
2015-11-24  7:15   ` Tian, Kevin
2015-11-03  8:43 ` [PATCH v9 07/17] vmx: Initialize VT-d Posted-Interrupts Descriptor Feng Wu
2015-11-03  8:43 ` [PATCH v9 08/17] vmx: Suppress posting interrupts when 'SN' is set Feng Wu
2015-11-24  7:29   ` Tian, Kevin
2015-11-24  7:46     ` Wu, Feng
2015-11-24  7:52       ` Tian, Kevin
2015-11-24  7:55         ` Wu, Feng
2015-11-03  8:43 ` [PATCH v9 09/17] VT-d: Remove pointless casts Feng Wu
2015-11-24  7:30   ` Tian, Kevin
2015-11-03  8:43 ` [PATCH v9 10/17] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts Feng Wu
2015-11-03  8:43 ` [PATCH v9 11/17] vt-d: Add API to update IRTE when VT-d PI is used Feng Wu
2015-11-24  7:45   ` Tian, Kevin
2015-11-24  7:54     ` Wu, Feng
2015-11-24  7:56       ` Tian, Kevin
2015-11-24  8:52         ` Jan Beulich
2015-11-24 12:05           ` Tian, Kevin
2015-11-03  8:43 ` [PATCH v9 12/17] x86: move some APIC related macros to apicdef.h Feng Wu
2015-11-03  8:43 ` [PATCH v9 13/17] Update IRTE according to guest interrupt config changes Feng Wu
2015-11-03  8:43 ` [PATCH v9 14/17] vmx: Properly handle notification event when vCPU is running Feng Wu
2015-11-03  8:43 ` [PATCH v9 15/17] vmx: VT-d posted-interrupt core logic handling Feng Wu
2015-11-03  9:07   ` Wu, Feng
2015-11-10 16:59     ` Dario Faggioli
2015-11-11  1:43       ` Wu, Feng
2015-11-11 13:29         ` Wu, Feng
2015-11-11 14:46           ` Dario Faggioli
2015-11-10 18:14   ` Dario Faggioli
2015-11-03  8:43 ` [PATCH v9 16/17] VT-d: Dump the posted format IRTE Feng Wu
2015-11-17 15:55   ` Jan Beulich
2015-11-24  7:50   ` Tian, Kevin
2015-11-03  8:43 ` [PATCH v9 17/17] Add a command line parameter for VT-d posted-interrupts Feng Wu
2015-11-10  7:33 ` [PATCH v9 00/17] Add VT-d Posted-Interrupts support Wu, Feng
2015-11-10 10:39   ` Jan Beulich
2015-11-17 15:39   ` Jan Beulich

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=AADFC41AFE54684AB9EE6CBC0274A5D15F71B817@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.