From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Baolu Lu <baolu.lu@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
Joerg Roedel <joro@8bytes.org>,
David Woodhouse <dwmw2@infradead.org>,
"Raj, Ashok" <ashok.raj@intel.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"Ghorai, Sukumar" <sukumar.ghorai@intel.com>,
jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH] iommu/vt-d: Fix PASID directory pointer coherency
Date: Tue, 7 Feb 2023 10:09:18 -0800 [thread overview]
Message-ID: <20230207100918.73df2f32@jacob-builder> (raw)
In-Reply-To: <BN9PR11MB52762264B58BA63D81F50F3E8CDB9@BN9PR11MB5276.namprd11.prod.outlook.com>
Hi Kevin,
On Tue, 7 Feb 2023 00:41:16 +0000, "Tian, Kevin" <kevin.tian@intel.com>
wrote:
> > From: Jacob Pan <jacob.jun.pan@linux.intel.com>
> > Sent: Tuesday, February 7, 2023 1:25 AM
> >
> > > > @@ -1976,6 +1976,12 @@ static int
> > domain_context_mapping_one(struct
> > > > dmar_domain *domain, pds = context_get_sm_pds(table);
> > > > context->lo = (u64)virt_to_phys(table->table) |
> > > > context_pdts(pds);
> > > > + /*
> > > > + * Scalable-mode PASID directory pointer is not
> > > > snooped if the
> > > > + * coherent bit is not set.
> > > > + */
> > > > + if (!ecap_coherent(iommu->ecap))
> > > > + clflush_cache_range(table->table,
> > > > sizeof(void *));
> > >
> > > This isn't comprehensive. The clflush should be called whenever the
> > > pasid directory table is allocated or updated.
> > >
> > allocate a pasid table does not mean it gets used by iommu hw, not
> > until it is programmed into context entry.
> >
>
> this is insufficient.
>
> Even after this point the PASID directory entry could be changed when
> a new PASID table is allocated, e.g. in intel_pasid_get_entry().
>
you are right, will include updates in v2.
Thanks,
Jacob
next prev parent reply other threads:[~2023-02-07 18:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 22:07 [PATCH] iommu/vt-d: Fix PASID directory pointer coherency Jacob Pan
2023-02-04 3:43 ` Baolu Lu
2023-02-06 17:25 ` Jacob Pan
2023-02-07 0:41 ` Tian, Kevin
2023-02-07 18:09 ` Jacob Pan [this message]
2023-02-07 7:10 ` Baolu Lu
2023-02-07 18:08 ` Jacob Pan
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=20230207100918.73df2f32@jacob-builder \
--to=jacob.jun.pan@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sukumar.ghorai@intel.com \
--cc=yi.l.liu@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 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).