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]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux