xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Xu, Quan" <quan.xu@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "dario.faggioli@citrix.com" <dario.faggioli@citrix.com>,
	"Wu, Feng" <feng.wu@intel.com>,
	"jbeulich@suse.com" <jbeulich@suse.com>
Subject: Re: [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue
Date: Wed, 23 Mar 2016 05:39:55 +0000	[thread overview]
Message-ID: <945CA011AD5F084CBEA3E851C0AB28894B869E7C@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F7F16FC@SHSMSX101.ccr.corp.intel.com>

On March 23, 2016 1:37pm, <kevin.tian@intel.com> wrote:
> > From: Xu, Quan
> > Sent: Wednesday, March 23, 2016 11:30 AM
> >
> > >
> > > Yes, still inconsistent. As I said, you put invalidation sync within
> > > dev_invalidate_iotlb, while for all other IOMMU invalidations the
> > > sync is put after. Below would be consistent then:
> > >
> > >         if ( flush_dev_iotlb )
> > >             ret = dev_invalidate_iotlb(iommu, did, addr, size_order,
> type);
> > >         rc = dev_invalidate_iotlb_sync(...);
> > >         if ( !ret )
> > >             ret = rc;
> > >
> >   Kevin,
> >   now I doubt that I should put invalidation sync within
> > dev_invalidate_iotlb, which was also your suggestion.
> > As the dev_invalidate_iotlb() is invalidation for all of domain's ATS
> > devices. If in this consistent way, we couldn't Find which ATS device
> > flush timed out, then we need to hide all of domain's ATS devices.
> > Do you recall it?
> >   Also I think it is reluctant to put invalidate_sync within
> > queue_invalidate_iotlb() for consistent issue.
> > Quan
> 
> Yes I recall this story.
> 
> What about doing this? Let's wrap a _sync version for all flush interfaces, like
> below:
> 
> static int queue_invalidate_context_sync(...)
> {
> 	queue_invalidate_context(...);
> 	return invalidate_sync(...);
> }
> 
> Then invoke _sync version at all callers, e.g.:
> static int flush_context_qi(...)
> {
> 	...
> 	if ( qi_ctrl->qinval_maddr != 0 )
> 		ret = queue_invalidate_context_sync(...);
> }
> 
> similarly we'll have dev_invalidate_iotlb_sync for device IOTLB flush.
> 
> It simplifies caller logic and make code more readable. :-)
> 

Agreed, I would follow it and send out v8 ASAP, then I could focus on prereq patch set. :)


Quan



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

  reply	other threads:[~2016-03-23  5:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  7:12 [PATCH v7 0/2] VT-d Device-TLB flush issue Quan Xu
2016-03-17  7:12 ` [PATCH v7 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed Quan Xu
2016-03-17  7:45   ` Tian, Kevin
2016-03-17  8:11     ` Xu, Quan
2016-03-17  8:13       ` Jan Beulich
2016-03-17  8:17         ` Xu, Quan
2016-03-17  7:12 ` [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue Quan Xu
2016-03-17  8:17   ` Tian, Kevin
2016-03-17  9:43     ` Jan Beulich
2016-03-17 11:13       ` Tian, Kevin
2016-03-17 11:30         ` Xu, Quan
2016-03-17 11:32         ` Tian, Kevin
2016-03-17 11:33         ` Jan Beulich
2016-03-18 12:21     ` Xu, Quan
2016-03-21  3:27       ` Tian, Kevin
2016-03-23  2:12         ` Xu, Quan
2016-03-23  3:29         ` Xu, Quan
2016-03-23  5:36           ` Tian, Kevin
2016-03-23  5:39             ` Xu, Quan [this message]
2016-03-18 11:18   ` Jan Beulich
2016-03-18 11:31     ` Xu, Quan
2016-03-18 13:35       ` 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=945CA011AD5F084CBEA3E851C0AB28894B869E7C@SHSMSX101.ccr.corp.intel.com \
    --to=quan.xu@intel.com \
    --cc=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=jbeulich@suse.com \
    --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).