Re: [PATCH v2 09/17] iommufd: Add enforced_cache_coherency to iommufd_hw_pagetable_alloc()

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

 



On Wed, Mar 08, 2023 at 09:04:47PM +0800, Baolu Lu wrote:
> > +	/* Try to upgrade the domain we have */
> > +	if (idev->enforce_cache_coherency) {
> > +		rc = iommufd_hw_pagetable_enforce_cc(hwpt);
> > +		if (rc)
> > +			return rc;
> 
> As "HWPT should have the coherency set properly for the device that it
> is being created for when it is created", is it an incompatible case if
> 
> 	idev->enforce_cache_coherency && !hwpt->enforce_cache_coherency
> 
> ?
> 
> If so, why not,
> 
> 	if (idev->enforce_cache_coherency && !hwpt->enforce_cache_coherency)
> 		return -EINVAL;

In principle you can create a HWPT for device A and then later attach
it to device B

If B requires coherency then we try to upgrade the existing domain.

This is an effort to try an minimize the number of domains that we
need to have for simpe IOAS based cases where we don't want to spawn
two auto domains

Jason



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux