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: <BN9PR11MB52763C7B838B04D3200322FD8C58A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Fri, 16 Jun 2023 02:43:13 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Jason Gunthorpe <jgg@...dia.com>
CC:     "Liu, Yi L" <yi.l.liu@...el.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
        "cohuck@...hat.com" <cohuck@...hat.com>,
        "eric.auger@...hat.com" <eric.auger@...hat.com>,
        "nicolinc@...dia.com" <nicolinc@...dia.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
        "chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
        "yi.y.sun@...ux.intel.com" <yi.y.sun@...ux.intel.com>,
        "peterx@...hat.com" <peterx@...hat.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        "shameerali.kolothum.thodi@...wei.com" 
        <shameerali.kolothum.thodi@...wei.com>,
        "lulu@...hat.com" <lulu@...hat.com>,
        "suravee.suthikulpanit@....com" <suravee.suthikulpanit@....com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "Duan, Zhenzhong" <zhenzhong.duan@...el.com>
Subject: RE: [PATCH v2 00/11] iommufd: Add nesting infrastructure

> From: Jason Gunthorpe <jgg@...dia.com>
> Sent: Tuesday, June 6, 2023 10:18 PM
> 
> > > > It's not necessarily to add reserved regions to the IOAS of the parent
> > > > hwpt since the device doesn't access that address space after it's
> > > > attached to stage-1. The parent is used only for address translation
> > > > in the iommu side.
> > >
> > > But if we don't put them in the IOAS of the parent there is no way for
> > > userspace to learn what they are to forward to the VM ?
> >
> > emmm I wonder whether that is the right interface to report
> > per-device reserved regions.
> 
> The iommu driver needs to report different reserved regions for the S1
> and S2 iommu_domains, 

I can see the difference between RID and RID+PASID, but not sure whether
it's a actual requirement regarding to attached domain.

e.g. if only talking about RID then the same set of reserved regions should
be reported for both S1 attach and S2 attach.

> and the IOAS should only get the reserved regions for the S2.
> 
> Currently the API has no way to report per-domain reserved regions and
> that is possibly OK for now. The S2 really doesn't have reserved
> regions beyond the domain aperture.
> 
> So an ioctl to directly query the reserved regions for a dev_id makes
> sense.

Or more specifically query the reserved regions for RID-based access.

Ideally for PASID there is no reserved region otherwise SVA won't work. 😊

> 
> > > Since we expect the parent IOAS to be usable in an identity mode I
> > > think they should be added, at least I can't see a reason not to add
> > > them.
> >
> > this is a good point.
> 
> But it mixes things
> 
> The S2 doesn't have reserved ranges restrictions, we always have some
> model of a S1, even for identity mode, that would carry the reserved
> ranges.
> 
> > With that it makes more sense to make it a vendor specific choice.
> 
> It isn't vendor specific, the ranges come from the domain that is
> attached to the IOAS, and we simply don't import ranges for a S2
> domain.
> 

With above I think the ranges are static per device.

When talking about RID-based nesting alone, ARM needs to add reserved
regions to the parent IOAS as identity is a valid S1 mode in nesting.

But for Intel RID nesting excludes identity (which becomes a direct
attach to S2) so the reserved regions apply to S1 instead of the parent IOAS.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ