Re: [PATCH v3 5/6] iommu: Use EINVAL for incompatible device/domain in ->attach_dev

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

 



On Tue, Sep 20, 2022 at 06:38:18AM +0000, Tian, Kevin wrote:

> Above lacks of a conversion in intel-iommu:
> 
> intel_iommu_attach_device()
> 	if (domain->type == IOMMU_DOMAIN_UNMANAGED &&
> 	    device_is_rmrr_locked(dev)) {
> 		dev_warn(dev, "Device is ineligible for IOMMU domain attach due to platform RMRR requirement.  Contact your platform vendor.\n");
> 		return -EPERM;
> 	}
> 
> since it's based on the domain type, picking a different domain
> may work in theory though it won't apply to vfio which always
> creates unmanaged type.

IMHO this test shouldn't even be here, that is why it is so
strange..

VFIO should be checking if somehow the device doesn't support
unmanaged domains at all. We already have several drivers that can't
support full featured unamanged domains that vfio needs, this is just
another case of that.

But it isn't urgent to fix, I would just ignore this branch for this
series.

Jason




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux