xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Quan Xu <quan.xu@intel.com>, xen-devel@lists.xen.org
Cc: kevin.tian@intel.com, feng.wu@intel.com, jbeulich@suse.com
Subject: Re: [PATCH v8 2/3] VT-d: Wrap a _sync version for all VT-d flush interfaces
Date: Thu, 24 Mar 2016 16:06:00 +0100	[thread overview]
Message-ID: <1458831960.5082.47.camel@citrix.com> (raw)
In-Reply-To: <1458827797.5082.40.camel@citrix.com>


[-- Attachment #1.1: Type: text/plain, Size: 3012 bytes --]

On Thu, 2016-03-24 at 14:56 +0100, Dario Faggioli wrote:
> On Thu, 2016-03-24 at 13:57 +0800, Quan Xu wrote:
> > 
> > @@ -134,8 +133,8 @@ int dev_invalidate_iotlb(struct iommu *iommu,
> > u16
> > did,
> >              /* invalidate all translations:
> > sbit=1,bit_63=0,bit[62:12]=1 */
> >              sbit = 1;
> >              addr = (~0UL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
> > -            rc = qinval_device_iotlb(iommu, pdev->ats_queue_depth,
> > -                                     sid, sbit, addr);
> > +            ret = qinval_device_iotlb_sync(iommu, pdev-
> > > 
> > > ats_queue_depth,
> > +                                           sid, sbit, addr);
> >              break;
> >          case DMA_TLB_PSI_FLUSH:
> >              if ( !device_in_domain(iommu, pdev, did) )
> > @@ -154,16 +153,13 @@ int dev_invalidate_iotlb(struct iommu *iommu,
> > u16 did,
> >                  addr |= (((u64)1 << (size_order - 1)) - 1) <<
> > PAGE_SHIFT_4K;
> >              }
> >  
> > -            rc = qinval_device_iotlb(iommu, pdev->ats_queue_depth,
> > -                                     sid, sbit, addr);
> > +            ret = qinval_device_iotlb_sync(iommu, pdev-
> > > 
> > > ats_queue_depth,
> > +                                           sid, sbit, addr);
> >              break;
> >          default:
> >              dprintk(XENLOG_WARNING VTDPREFIX, "invalid vt-d flush
> > type\n");
> >              return -EOPNOTSUPP;
> >          }
> > -
> > -        if ( !ret )
> > -            ret = rc;
> >      }
> >  
> >      return ret;
> > 
> Am I misreading something or we are introducing synchronous handling,
> which was not there before?
> 
> If yes, is it ok to do this in this patch?
> 
> And if yes again, I think that it at least should be noted in the
> changelog, as it would mean that the patch is not only introducing
> some
> wrappers.
> 
Ok, I think I see what's happening here. Before this patch,
invalidate_sync() was being called inside qinval_device_iotlb(), so we
were synchronous already, and we need to continue to be like that, by
calling the _sync() variants.

Yes, if this is what happens, this also looks ok to me.

Sorry for the noise.

Regards,
Dario

> Regads,
> Dario
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2016-03-24 15:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  5:57 [PATCH v8 0/3] VT-d Device-TLB flush issue Quan Xu
2016-03-24  5:57 ` [PATCH v8 2/3] VT-d: Wrap a _sync version for all VT-d flush interfaces Quan Xu
2016-03-24 13:56   ` Dario Faggioli
2016-03-24 15:06     ` Dario Faggioli [this message]
2016-03-25  3:11       ` Xu, Quan
2016-03-24  5:57 ` [PATCH v8 1/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed Quan Xu
2016-03-24 11:04   ` Dario Faggioli
2016-03-24 11:28     ` Xu, Quan
2016-03-25 20:06   ` Konrad Rzeszutek Wilk
2016-03-28  6:27     ` Xu, Quan
2016-03-28 13:31       ` Konrad Rzeszutek Wilk
2016-04-01 15:03         ` Xu, Quan
2016-03-24  5:57 ` [PATCH v8 3/3] VT-d: Fix vt-d Device-TLB flush timeout issue Quan Xu
2016-03-24 15:38   ` Dario Faggioli
2016-03-25  3:43     ` Xu, Quan
2016-03-25 20:40     ` Konrad Rzeszutek Wilk
2016-03-28  3:44       ` Xu, Quan
2016-03-28  7:45     ` Xu, Quan
2016-03-25 20:31   ` Konrad Rzeszutek Wilk
2016-03-28  3:56     ` Xu, Quan
2016-03-28 14:11       ` Konrad Rzeszutek Wilk
2016-03-29  1:32         ` Xu, Quan
2016-03-29 14:20           ` Konrad Rzeszutek Wilk
2016-03-29 14:32             ` Xu, Quan
2016-03-24 10:33 ` [PATCH v8 0/3] VT-d Device-TLB flush issue Jan Beulich
2016-03-24 11:11   ` Xu, Quan
2016-04-01 14:47     ` 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=1458831960.5082.47.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=jbeulich@suse.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).