xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Quan Xu <quan.xu@intel.com>
Cc: "dario.faggioli@citrix.com" <dario.faggioli@citrix.com>,
	Feng Wu <feng.wu@intel.com>, Kevin Tian <kevin.tian@intel.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v10 2/3] vt-d: synchronize for Device-TLB flush one by one
Date: Wed, 18 May 2016 03:29:11 -0600	[thread overview]
Message-ID: <573C520702000078000EC6CB@prv-mh.provo.novell.com> (raw)
In-Reply-To: <945CA011AD5F084CBEA3E851C0AB28894B8B1B15@SHSMSX101.ccr.corp.intel.com>

>>> On 18.05.16 at 10:53, <quan.xu@intel.com> wrote:
> On May 17, 2016 8:37 PM, Jan Beulich <JBeulich@suse.com>wrote:
>> >>> On 22.04.16 at 12:54, <quan.xu@intel.com> wrote:
>> > -static void queue_invalidate_iotlb(struct iommu *iommu,
>> > -    u8 granu, u8 dr, u8 dw, u16 did, u8 am, u8 ih, u64 addr)
>> > +static int __must_check queue_invalidate_iotlb_sync(struct iommu
>> *iommu,
>> > +                                                    u8 granu, u8 dr, u8 dw,
>> > +                                                    u16 did, u8 am, u8 ih,
>> > +                                                    u64 addr)
>> >  {
>> >      unsigned long flags;
>> >      unsigned int index;
>> > @@ -133,10 +141,12 @@ static void queue_invalidate_iotlb(struct iommu
>> *iommu,
>> >      unmap_vtd_domain_page(qinval_entries);
>> >      qinval_update_qtail(iommu, index);
>> >      spin_unlock_irqrestore(&iommu->register_lock, flags);
>> > +
>> > +    return invalidate_sync(iommu);
>> >  }
>> 
>> With this, ...
>> 
>> > @@ -346,9 +353,13 @@ static int flush_iotlb_qi(
>> >          if (cap_read_drain(iommu->cap))
>> >              dr = 1;
>> >          /* Need to conside the ih bit later */
>> > -        queue_invalidate_iotlb(iommu,
>> > -                               type >> DMA_TLB_FLUSH_GRANU_OFFSET, dr,
>> > -                               dw, did, size_order, 0, addr);
>> > +        ret = queue_invalidate_iotlb_sync(iommu,
>> > +                                          type >> DMA_TLB_FLUSH_GRANU_OFFSET,
>> > +                                          dr, dw, did, size_order, 0, addr);
>> > +
>> > +        if ( ret )
>> > +            return ret;
>> > +
>> >          if ( flush_dev_iotlb )
>> >              ret = dev_invalidate_iotlb(iommu, did, addr, size_order, type);
>> >          rc = invalidate_sync(iommu);
>> 
>> ... why does this invalidate_sync() not go away?
>> 
> 
> Oh, it is your suggestion -- leaving the existing logic as is would be better - 
> best effort invalidation even when an error has occurred.
> 
> http://lists.xenproject.org/archives/html/xen-devel/2016-04/msg00523.html 

Look like this was a bad comment of mine (resulting from
dev_invalidate_iotlb(), other than the other respective functions,
not getting a _sync tag added), and I would have appreciated if
you had simply pointed out the redundancy. Please remember
that the review process is bi-directional, and hence doesn't mean
you need to blindly do everything a reviewer asks for: Things you
agree with should be changed in code. For things you don't agree
with you should reply verbally, explaining why a requested change
shouldn't be done.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-05-18  9:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 10:54 [PATCH v10 0/3] VT-d Device-TLB flush issue Quan Xu
2016-04-22 10:54 ` [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation Quan Xu
2016-05-13 15:27   ` Jan Beulich
2016-05-16 15:25     ` Xu, Quan
2016-05-17  3:19       ` Tian, Kevin
2016-05-17  7:47         ` Jan Beulich
2016-05-18 12:53           ` Xu, Quan
2016-05-18 15:05             ` Jan Beulich
2016-05-19  0:32               ` Tian, Kevin
2016-05-19  1:35                 ` Xu, Quan
2016-05-19  6:13                   ` Jan Beulich
2016-05-19 11:26                     ` Xu, Quan
2016-05-19 11:35                       ` Jan Beulich
2016-05-19 15:14                         ` Xu, Quan
2016-04-22 10:54 ` [PATCH v10 2/3] vt-d: synchronize for Device-TLB flush one by one Quan Xu
2016-05-17 12:36   ` Jan Beulich
2016-05-18  8:53     ` Xu, Quan
2016-05-18  9:29       ` Jan Beulich [this message]
2016-05-18 12:02         ` Xu, Quan
2016-04-22 10:54 ` [PATCH v10 3/3] vt-d: fix vt-d Device-TLB flush timeout issue Quan Xu
2016-05-17 14:00   ` Jan Beulich
2016-05-18 13:11     ` Xu, Quan
2016-05-20  7:15     ` Xu, Quan
2016-05-20  9:58       ` Jan Beulich
2016-05-23 14:00         ` Xu, Quan

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=573C520702000078000EC6CB@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=quan.xu@intel.com \
    --cc=xen-devel@lists.xen.org \
    /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;
as well as URLs for NNTP newsgroup(s).