xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Xu, Quan" <quan.xu@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	"dario.faggioli@citrix.com" <dario.faggioli@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Wu, Feng" <feng.wu@intel.com>
Subject: Re: [PATCH v9 1/3] vt-d: fix the IOMMU flush issue
Date: Wed, 22 Jun 2016 03:07:52 +0000	[thread overview]
Message-ID: <945CA011AD5F084CBEA3E851C0AB28894B8F3E9A@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <57695C5F02000078000F7396@prv-mh.provo.novell.com>

On June 21, 2016 9:25 PM, Jan Beulich <JBeulich@suse.com> wrote:
> >>> On 17.06.16 at 05:37, <quan.xu@intel.com> wrote:
> > @@ -546,17 +550,37 @@ static int __must_check iommu_flush_all(void)
> >      struct acpi_drhd_unit *drhd;
> >      struct iommu *iommu;
> >      int flush_dev_iotlb;
> > +    int rc = 0;
> >
> >      flush_all_cache();
> >      for_each_drhd_unit ( drhd )
> >      {
> > +        int context_rc, iotlb_rc;
> > +
> >          iommu = drhd->iommu;
> > -        iommu_flush_context_global(iommu, 0);
> > +        context_rc = iommu_flush_context_global(iommu, 0);
> >          flush_dev_iotlb = find_ats_dev_drhd(iommu) ? 1 : 0;
> > -        iommu_flush_iotlb_global(iommu, 0, flush_dev_iotlb);
> > +        iotlb_rc = iommu_flush_iotlb_global(iommu, 0,
> > + flush_dev_iotlb);
> > +
> > +        /*
> > +         * The current logic for returns:
> > +         *   - positive  invoke iommu_flush_write_buffer to flush cache.
> > +         *   - zero      on success.
> > +         *   - negative  on failure. Continue to flush IOMMU IOTLB on a
> > +         *               best effort basis.
> > +         */
> > +        if ( context_rc > 0 || iotlb_rc > 0 )
> > +            iommu_flush_write_buffer(iommu);
> > +        if ( context_rc >= 0 )
> 
> Wasn't this meant to be just "rc"? (I can't, btw, imagine Kevin's ack to be
> rightfully retained with a change like this.)
>
SORRY, it is 'rc'. It is really my mistake here, but Kevin's ack is right as the previous v8 was:

+        if ( rc >= 0 )
+            rc = iommu_rc;
+        if ( rc >= 0 )
+            rc = iommu_ret;

,, I will send it out again with this fix.

Quan

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

  reply	other threads:[~2016-06-22  3:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  3:37 [PATCH v9 0/3] Check VT-d Device-TLB flush error Xu, Quan
2016-06-17  3:37 ` [PATCH v9 1/3] vt-d: fix the IOMMU flush issue Xu, Quan
2016-06-21 13:25   ` Jan Beulich
2016-06-22  3:07     ` Xu, Quan [this message]
2016-06-17  3:37 ` [PATCH v9 2/3] vt-d: propagate the IOMMU Device-TLB flush error up to ME phantom functions Xu, Quan
2016-06-17  3:37 ` [PATCH v9 3/3] vt-d: add __must_check annotation to IOMMU flush pointers and handlers 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=945CA011AD5F084CBEA3E851C0AB28894B8F3E9A@SHSMSX101.ccr.corp.intel.com \
    --to=quan.xu@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@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).