Re: [PATCH v3 10/15] iommufd: IOCTLs for the io_pagetable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 08, 2022 at 02:05:20AM +0000, Tian, Kevin wrote:
> > The concept was the allow list only really impacts domain
> > attachment. When a user uses FIXED they have to know what they are
> 
> it also impacts automatic IOVA
> 
> > doing. There is not a good reason to deny the user to use any IOVA
> > that is not restricted by the reserved list.
> 
> I just didn't get why different restrictions are applied to automatics vs.
> fixed allocation.

Because it isn't a restriction on allocation, it is a restriction on
domain attachment. (and this is a bit confusing and subtle, but it is
what it was built for)

The purpose is to allow the IOMMU driver to allocate a domain with
knowledge of what the user would like to do. For instance a small
allowed range may allow the driver to allocate fewer hops in the IO
page table, and a create a domain with a smaller aperture.

"automatic" is supposed to find a good IOVA that is the best IOVA for
that mapping. We have defined the best IOVA as one that doesn't reach
into areas that future domains are allowed to mark as reserved.

fixed can do anything legal, including violate the allowances if it
wants. This just means a future domain attachment might fail. Domain's
won't look at any currently mapped IOVA, only the allowance ranges
when they size themselves.

Jason



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux