All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: "Raj, Ashok" <ashok.raj@intel.com>, Lu Baolu <baolu.lu@linux.intel.com>
Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
	"Kumar, Sanjay K" <sanjay.k.kumar@intel.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Sun, Yi Y" <yi.y.sun@intel.com>,
	"Pan, Jacob jun" <jacob.jun.pan@intel.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: RE: [PATCH v2 06/12] iommu/vt-d: Add second level page table interface
Date: Thu, 13 Sep 2018 05:52:32 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D191301901@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20180907174328.GA95061@otc-nc-03>

> From: Raj, Ashok
> Sent: Saturday, September 8, 2018 1:43 AM
> 
> On Fri, Sep 07, 2018 at 10:47:11AM +0800, Lu Baolu wrote:
> >
> > >>+
> > >>+	intel_pasid_clear_entry(dev, pasid);
> > >>+
> > >>+	if (!ecap_coherent(iommu->ecap)) {
> > >>+		pte = intel_pasid_get_entry(dev, pasid);
> > >>+		clflush_cache_range(pte, sizeof(*pte));
> > >>+	}
> > >>+
> > >>+	pasid_based_pasid_cache_invalidation(iommu, did, pasid);
> > >>+	pasid_based_iotlb_cache_invalidation(iommu, did, pasid);
> > >>+
> > >>+	/* Device IOTLB doesn't need to be flushed in caching mode. */
> > >>+	if (!cap_caching_mode(iommu->cap))
> > >>+		pasid_based_dev_iotlb_cache_invalidation(iommu, dev,
> > >>pasid);
> > >
> > >can you elaborate, or point to any spec reference?
> > >
> >
> > In the driver, device iotlb doesn't get flushed in caching mode. I just
> > follow what have been done there.
> >
> > It also makes sense to me since only the bare metal host needs to
> > consider whether and how to flush the device iotlb.
> >
> 
> DavidW might remember, i think the idea was to help with cost
> of virtualization, we can avoid taking 2 exits vs handling
> it directly when we do iotlb flushing instead.
> 

OK, performance-wise it makes sense. though strictly speaking it
doesn't follow spec...

Thanks
Kevin

  reply	other threads:[~2018-09-13  5:52 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  1:35 [PATCH v2 00/12] iommu/vt-d: Add scalable mode support Lu Baolu
2018-08-30  1:35 ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 01/12] iommu/vt-d: Enumerate the scalable mode capability Lu Baolu
2018-08-30  1:35   ` Lu Baolu
2018-09-06  1:55   ` Tian, Kevin
2018-09-06  2:25     ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 02/12] iommu/vt-d: Manage scalalble mode PASID tables Lu Baolu
2018-09-06  2:14   ` Tian, Kevin
2018-09-06  2:46     ` Lu Baolu
2018-09-06  2:46       ` Lu Baolu
2018-09-06  2:52       ` Tian, Kevin
2018-09-06  3:05         ` Lu Baolu
2018-09-06  3:05           ` Lu Baolu
2018-09-06 23:43       ` Jacob Pan
2018-09-07  1:57         ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 03/12] iommu/vt-d: Move page table helpers into header Lu Baolu
2018-09-06  2:15   ` Tian, Kevin
2018-09-06  2:52     ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support Lu Baolu
2018-09-06  2:39   ` Tian, Kevin
2018-09-06  2:39     ` Tian, Kevin
2018-09-07  2:11     ` Lu Baolu
2018-09-07  2:11       ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 05/12] iommu/vt-d: Reserve a domain id for FL and PT modes Lu Baolu
2018-08-30  1:35   ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 06/12] iommu/vt-d: Add second level page table interface Lu Baolu
2018-09-06  3:11   ` Tian, Kevin
2018-09-07  2:47     ` Lu Baolu
2018-09-07  2:47       ` Lu Baolu
2018-09-07 17:43       ` Raj, Ashok
2018-09-13  5:52         ` Tian, Kevin [this message]
2018-08-30  1:35 ` [PATCH v2 07/12] iommu/vt-d: Setup pasid entry for RID2PASID support Lu Baolu
2018-08-30  1:35 ` [PATCH v2 08/12] iommu/vt-d: Pass pasid table to context mapping Lu Baolu
2018-09-06  3:17   ` Tian, Kevin
2018-09-07  2:13     ` Lu Baolu
2018-08-30  1:35 ` [PATCH v2 09/12] iommu/vt-d: Setup context and enable RID2PASID support Lu Baolu
2018-08-30  1:35 ` [PATCH v2 10/12] iommu/vt-d: Add first level page table interface Lu Baolu
2018-08-30  1:35 ` [PATCH v2 11/12] iommu/vt-d: Shared virtual address in scalable mode Lu Baolu
2018-08-30  1:35 ` [PATCH v2 12/12] iommu/vt-d: Remove deferred invalidation Lu Baolu

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=AADFC41AFE54684AB9EE6CBC0274A5D191301901@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=jean-philippe.brucker@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanjay.k.kumar@intel.com \
    --cc=yi.y.sun@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.