mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Merge tag 'v6.1-rc7' into iommufd.git for-next
Resolve conflicts in drivers/vfio/vfio_main.c by using the iommfd version. The rc fix was done a different way when iommufd patches reworked this code. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
@@ -311,6 +311,24 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
|
||||
if (idxd->state != IDXD_DEV_ENABLED)
|
||||
return -ENXIO;
|
||||
|
||||
/*
|
||||
* User type WQ is enabled only when SVA is enabled for two reasons:
|
||||
* - If no IOMMU or IOMMU Passthrough without SVA, userspace
|
||||
* can directly access physical address through the WQ.
|
||||
* - The IDXD cdev driver does not provide any ways to pin
|
||||
* user pages and translate the address from user VA to IOVA or
|
||||
* PA without IOMMU SVA. Therefore the application has no way
|
||||
* to instruct the device to perform DMA function. This makes
|
||||
* the cdev not usable for normal application usage.
|
||||
*/
|
||||
if (!device_user_pasid_enabled(idxd)) {
|
||||
idxd->cmd_status = IDXD_SCMD_WQ_USER_NO_IOMMU;
|
||||
dev_dbg(&idxd->pdev->dev,
|
||||
"User type WQ cannot be enabled without SVA.\n");
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
mutex_lock(&wq->wq_lock);
|
||||
wq->type = IDXD_WQT_USER;
|
||||
rc = drv_enable_wq(wq);
|
||||
|
||||
Reference in New Issue
Block a user