lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411091749.20afae6b@jacob-builder>
Date: Thu, 11 Apr 2024 09:17:49 -0700
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>
Cc: Baolu Lu <baolu.lu@...ux.intel.com>, "iommu@...ts.linux.dev"
 <iommu@...ts.linux.dev>, "Liu, Yi L" <yi.l.liu@...el.com>, Joerg Roedel
 <joro@...tes.org>, Will Deacon <will@...nel.org>, Robin Murphy
 <robin.murphy@....com>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH 2/2] iommu/vt-d: Remove caching mode check before devtlb
 flush

Hi Kevin,

On Wed, 10 Apr 2024 23:23:57 +0000, "Tian, Kevin" <kevin.tian@...el.com>
wrote:

> > From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> > Sent: Thursday, April 11, 2024 12:20 AM
> > 
> > Hi Kevin,
> > 
> > On Wed, 10 Apr 2024 00:32:06 +0000, "Tian, Kevin" <kevin.tian@...el.com>
> > wrote:
> >   
> > > > From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> > > > Sent: Wednesday, April 10, 2024 1:32 AM
> > > >
> > > > If the guest uses SL page tables in vIOMMU, we don;t expose ATS to
> > > > the guest. So ATS is not relevant here, does't matter map or unmap.
> > > >  
> > >
> > > ATS is orthogonal to SL vs. FL. Where is this restriction coming
> > > from?  
> > For practical purposes, what would be the usage to have SL in the guest
> > and ATS enabled. i.e. shadowing SL but directly expose ATS?
> >   
> 
> ATS is about the protocol between device and iommu to look up
> translations. Why does it care about internal paging layout in
> iommu?
> 
Maybe the original intent was missed, I was suggesting the devTLB flush
should be based on ATS cap (as you said here) not map/unmap.
 
-       /*
-        * In caching mode, changes of pages from non-present to present require
-        * flush. However, device IOTLB doesn't need to be flushed in this case.
-        */
-       if (!cap_caching_mode(iommu->cap) || !map)
-               iommu_flush_dev_iotlb(domain, addr, mask);
+       iommu_flush_dev_iotlb(domain, addr, mask);


Thanks,

Jacob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ