All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Feng" <feng.wu@intel.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"Wu, Feng" <feng.wu@intel.com>,
	"george.dunlap@eu.citrix.com" <george.dunlap@eu.citrix.com>,
	"jbeulich@suse.com" <jbeulich@suse.com>,
	"Zhang, Yang Z" <yang.z.zhang@intel.com>,
	"keir@xen.org" <keir@xen.org>
Subject: Re: [v3 04/15] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature
Date: Thu, 25 Jun 2015 12:47:06 +0000	[thread overview]
Message-ID: <E959C4978C3B6342920538CF579893F0025CDF4E@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <558BD4E6.5040104@citrix.com>



> -----Original Message-----
> From: Andrew Cooper [mailto:andrew.cooper3@citrix.com]
> Sent: Thursday, June 25, 2015 6:16 PM
> To: Wu, Feng; xen-devel@lists.xen.org
> Cc: Tian, Kevin; keir@xen.org; george.dunlap@eu.citrix.com;
> jbeulich@suse.com; Zhang, Yang Z
> Subject: Re: [Xen-devel] [v3 04/15] iommu: Add iommu_intpost to control VT-d
> Posted-Interrupts feature
> 
> On 25/06/15 10:47, Wu, Feng wrote:
> >
> >> -----Original Message-----
> >> From: Andrew Cooper [mailto:andrew.cooper3@citrix.com]
> >> Sent: Thursday, June 25, 2015 5:06 PM
> >> To: Wu, Feng; xen-devel@lists.xen.org
> >> Cc: Tian, Kevin; keir@xen.org; george.dunlap@eu.citrix.com;
> >> jbeulich@suse.com; Zhang, Yang Z
> >> Subject: Re: [Xen-devel] [v3 04/15] iommu: Add iommu_intpost to control
> VT-d
> >> Posted-Interrupts feature
> >>
> >> On 24/06/15 06:18, Feng Wu wrote:
> >>> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> >>> With VT-d Posted-Interrupts enabled, external interrupts from
> >>> direct-assigned devices can be delivered to guests without VMM
> >>> intervention when guest is running in non-root mode.
> >>>
> >>> This patch adds variable 'iommu_intpost' to control whether enable VT-d
> >>> posted-interrupt or not in the generic IOMMU code.
> >>>
> >>> Signed-off-by: Feng Wu <feng.wu@intel.com>
> >>> ---
> >>> v3:
> >>> - Remove pointless initializer for 'iommu_intpost'.
> >>> - Some adjustment for "if no intremap then no intpost" logic.
> >>>     * For parse_iommu_param(), move it to the end of the function,
> >>>       so we don't need to add the some logic when introduing the
> >>>       new kernel parameter 'intpost' in later patch.
> >>>     * Add this logic in iommu_setup() after iommu_hardware_setup()
> >>>       is called.
> >>>
> >>>  xen/drivers/passthrough/iommu.c | 10 +++++++++-
> >>>  xen/include/xen/iommu.h         |  2 +-
> >>>  2 files changed, 10 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/xen/drivers/passthrough/iommu.c
> >> b/xen/drivers/passthrough/iommu.c
> >>> index 06cb38f..597f676 100644
> >>> --- a/xen/drivers/passthrough/iommu.c
> >>> +++ b/xen/drivers/passthrough/iommu.c
> >>> @@ -39,6 +39,7 @@ static void iommu_dump_p2m_table(unsigned char
> >> key);
> >>>   *   no-snoop                   Disable VT-d Snoop Control
> >>>   *   no-qinval                  Disable VT-d Queued Invalidation
> >>>   *   no-intremap                Disable VT-d Interrupt Remapping
> >>> + *   no-intpost                 Disable VT-d Interrupt posting
> >>>   */
> >>>  custom_param("iommu", parse_iommu_param);
> >>>  bool_t __initdata iommu_enable = 1;
> >>> @@ -51,6 +52,7 @@ bool_t __read_mostly iommu_passthrough;
> >>>  bool_t __read_mostly iommu_snoop = 1;
> >>>  bool_t __read_mostly iommu_qinval = 1;
> >>>  bool_t __read_mostly iommu_intremap = 1;
> >>> +bool_t __read_mostly iommu_intpost;
> >>>  bool_t __read_mostly iommu_hap_pt_share = 1;
> >>>  bool_t __read_mostly iommu_debug;
> >>>  bool_t __read_mostly amd_iommu_perdev_intremap = 1;
> >>> @@ -112,6 +114,9 @@ static void __init parse_iommu_param(char *s)
> >>>
> >>>          s = ss + 1;
> >>>      } while ( ss );
> >>> +
> >>> +    if ( !iommu_intremap )
> >>> +        iommu_intpost = 0;
> >> This check is redundant - It will unconditionally be performed by
> >> iommu_setup().  I would just drop the hunk.
> >>
> >> However, what you are missing is parsing logic to catch a command line
> >> configuration such as "iommu=intremap,no-intpost"
> > Doesn't the above code cover this command line?
> 
> How would you expect it to? I do not see any strcmp( , "intpost") in
> this patch.

Oh, the command line handle logic is covered in [15/15].

Thanks,
Feng
> 
> ~Andrew

  reply	other threads:[~2015-06-25 12:47 UTC|newest]

Thread overview: 155+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24  5:18 [v3 00/15] Add VT-d Posted-Interrupts support Feng Wu
2015-06-24  5:18 ` [v3 01/15] Vt-d Posted-intterrupt (PI) design Feng Wu
2015-06-24  6:15   ` Meng Xu
2015-06-24  6:19     ` Wu, Feng
2015-07-08  7:21   ` Tian, Kevin
2015-07-08  7:29     ` Wu, Feng
2015-06-24  5:18 ` [v3 02/15] Add helper macro for X86_FEATURE_CX16 feature detection Feng Wu
2015-06-24 17:31   ` Andrew Cooper
2015-07-08  7:23   ` Tian, Kevin
2015-06-24  5:18 ` [v3 03/15] Add cmpxchg16b support for x86-64 Feng Wu
2015-06-24 18:35   ` Andrew Cooper
2015-07-08  7:06     ` Wu, Feng
2015-07-08  8:12       ` Jan Beulich
2015-07-08  8:33         ` Wu, Feng
2015-07-08  8:43           ` Jan Beulich
2015-07-08  8:50             ` Wu, Feng
2015-07-08  8:50         ` Andrew Cooper
2015-07-10 12:57   ` Jan Beulich
2015-06-24  5:18 ` [v3 04/15] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature Feng Wu
2015-06-25  9:06   ` Andrew Cooper
2015-06-25  9:47     ` Wu, Feng
2015-06-25 10:16       ` Andrew Cooper
2015-06-25 12:47         ` Wu, Feng [this message]
2015-07-08  7:30   ` Tian, Kevin
2015-06-24  5:18 ` [v3 05/15] vt-d: VT-d Posted-Interrupts feature detection Feng Wu
2015-06-25 10:21   ` Andrew Cooper
2015-06-25 13:02     ` Wu, Feng
2015-07-08  7:32   ` Tian, Kevin
2015-07-08  8:00     ` Wu, Feng
2015-06-24  5:18 ` [v3 06/15] vmx: Extend struct pi_desc to support VT-d Posted-Interrupts Feng Wu
2015-06-29 15:04   ` Andrew Cooper
2015-07-08  7:48   ` Tian, Kevin
2015-07-10 13:08   ` Jan Beulich
2015-07-15  2:40     ` Wu, Feng
2015-07-15  8:20       ` Jan Beulich
2015-07-15  8:26         ` Wu, Feng
2015-07-15  8:36           ` Jan Beulich
2015-07-15  8:43             ` Wu, Feng
2015-07-15  9:28               ` Jan Beulich
2015-07-15  9:30                 ` Wu, Feng
2015-07-15  3:13     ` Wu, Feng
2015-06-24  5:18 ` [v3 07/15] vmx: Initialize VT-d Posted-Interrupts Descriptor Feng Wu
2015-06-29 15:32   ` Andrew Cooper
2015-06-30  1:46     ` Wu, Feng
2015-06-30  2:32     ` Dario Faggioli
2015-07-08  7:53   ` Tian, Kevin
2015-06-24  5:18 ` [v3 08/15] Suppress posting interrupts when 'SN' is set Feng Wu
2015-06-29 15:41   ` Andrew Cooper
2015-06-30  1:48     ` Wu, Feng
2015-07-08  9:06   ` Tian, Kevin
2015-07-08 10:11     ` Wu, Feng
2015-07-08 11:31       ` Tian, Kevin
2015-07-08 11:58         ` Wu, Feng
2015-07-10 13:20   ` Jan Beulich
2015-06-24  5:18 ` [v3 09/15] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts Feng Wu
2015-06-29 16:04   ` Andrew Cooper
2015-06-30  1:52     ` Wu, Feng
2015-07-08  9:10   ` Tian, Kevin
2015-07-10 13:27   ` Jan Beulich
2015-06-24  5:18 ` [v3 10/15] vt-d: Add API to update IRTE when VT-d PI is used Feng Wu
2015-06-29 16:22   ` Andrew Cooper
2015-07-08  9:59   ` Tian, Kevin
2015-07-08 10:12     ` Wu, Feng
2015-07-10 14:01   ` Jan Beulich
2015-07-15  6:04     ` Wu, Feng
2015-07-15  8:24       ` Jan Beulich
2015-07-15  8:38         ` Wu, Feng
2015-07-15  8:46           ` Jan Beulich
2015-07-15  8:55             ` Wu, Feng
2015-07-15  9:32               ` Jan Beulich
2015-06-24  5:18 ` [v3 11/15] Update IRTE according to guest interrupt config changes Feng Wu
2015-06-29 16:46   ` Andrew Cooper
2015-07-08 10:22   ` Tian, Kevin
2015-07-08 10:31     ` Wu, Feng
2015-07-08 11:46       ` Tian, Kevin
2015-07-08 11:52         ` Wu, Feng
2015-07-08 11:54           ` Tian, Kevin
2015-07-10 14:23   ` Jan Beulich
2015-06-24  5:18 ` [v3 12/15] vmx: posted-interrupt handling when vCPU is blocked Feng Wu
2015-06-29 17:07   ` Andrew Cooper
2015-07-08 10:36     ` Wu, Feng
2015-07-08 10:48       ` Jan Beulich
     [not found]   ` <559181F9.6020106@citrix.com>
2015-06-30  2:51     ` Fwd: " Dario Faggioli
2015-06-30  2:59       ` Wu, Feng
2015-06-30  9:46         ` Dario Faggioli
2015-06-30 10:11   ` Andrew Cooper
2015-07-01 13:26     ` Dario Faggioli
2015-07-02  4:27       ` Wu, Feng
2015-07-02  8:30         ` Dario Faggioli
2015-07-02  8:58           ` Wu, Feng
2015-07-02 10:09             ` Dario Faggioli
2015-07-02 10:41               ` Wu, Feng
2015-07-02 10:30           ` Andrew Cooper
2015-07-02 10:56             ` Wu, Feng
2015-07-02 12:04             ` Dario Faggioli
2015-07-02 12:10               ` Wu, Feng
2015-07-02 12:16               ` Andrew Cooper
2015-07-02 12:38                 ` Dario Faggioli
2015-07-02 12:59                   ` Andrew Cooper
2015-07-03  1:33                     ` Wu, Feng
2015-07-02  4:25     ` Wu, Feng
2015-07-08 11:00   ` Tian, Kevin
2015-07-08 11:02     ` Wu, Feng
2015-07-08 12:46     ` Jan Beulich
2015-07-08 13:09       ` Andrew Cooper
2015-07-08 22:49         ` Tian, Kevin
2015-07-09  7:25           ` Jan Beulich
2015-07-10  6:21             ` Wu, Feng
2015-07-10  6:32               ` Jan Beulich
2015-07-10  7:29                 ` Wu, Feng
2015-07-10  8:49                   ` Jan Beulich
2015-07-10  8:57                     ` Wu, Feng
2015-07-08 22:31       ` Tian, Kevin
2015-06-24  5:18 ` [v3 13/15] vmx: Properly handle notification event when vCPU is running Feng Wu
2015-07-08 11:03   ` Tian, Kevin
2015-07-10 14:40   ` Jan Beulich
2015-06-24  5:18 ` [v3 14/15] Update Posted-Interrupts Descriptor during vCPU scheduling Feng Wu
     [not found]   ` <55918214.4030102@citrix.com>
2015-06-30  2:58     ` Fwd: " Dario Faggioli
2015-07-02  4:32       ` Wu, Feng
2015-07-02  4:34         ` Wu, Feng
2015-07-02  8:20         ` Dario Faggioli
2015-07-09  3:09           ` Wu, Feng
2015-07-09  8:18             ` Dario Faggioli
2015-07-09 11:19             ` George Dunlap
2015-07-09 11:29               ` George Dunlap
2015-07-09 11:38               ` Wu, Feng
2015-07-09 12:42                 ` Dario Faggioli
2015-07-10  0:07                   ` Wu, Feng
2015-07-10 12:40                     ` Dario Faggioli
2015-07-10 13:47                       ` Konrad Rzeszutek Wilk
2015-07-10 13:59                         ` Dario Faggioli
2015-07-09 12:53                 ` George Dunlap
2015-07-09 13:44                   ` Jan Beulich
2015-07-09 14:18                     ` Dario Faggioli
2015-07-09 14:27                       ` George Dunlap
2015-07-09 14:47                         ` Dario Faggioli
2015-07-10  5:59                         ` Wu, Feng
2015-07-10  6:22                           ` Jan Beulich
2015-07-10 11:05                             ` Dario Faggioli
2015-07-14  5:44                               ` Wu, Feng
2015-07-14 14:08                               ` Wu, Feng
2015-07-14 14:54                                 ` Jan Beulich
2015-07-14 15:20                                   ` Dario Faggioli
2015-07-14 16:41                                     ` George Dunlap
2015-07-14 16:02                                 ` Dario Faggioli
2015-07-15  0:54                                   ` Wu, Feng
2015-07-17  7:46                                   ` Wu, Feng
2015-07-17 10:13                                     ` Dario Faggioli
2015-07-17 22:57                                       ` Wu, Feng
2015-07-18 13:43                                         ` Dario Faggioli
2015-07-10  0:15                   ` Wu, Feng
2015-07-08 11:24   ` Tian, Kevin
2015-07-10 14:48   ` Jan Beulich
2015-06-24  5:18 ` [v3 15/15] Add a command line parameter for VT-d posted-interrupts Feng Wu
2015-07-08 11:25   ` Tian, Kevin

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=E959C4978C3B6342920538CF579893F0025CDF4E@SHSMSX104.ccr.corp.intel.com \
    --to=feng.wu@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --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.