]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
accel/amdxdna: Block running when IOMMU is off
authorLizhi Hou <lizhi.hou@amd.com>
Wed, 20 May 2026 22:35:31 +0000 (15:35 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Thu, 21 May 2026 17:23:00 +0000 (10:23 -0700)
The AIE2 device firmware requires IOMMU on.

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5319
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260520223531.1403302-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_pci.c

index f1ac4e00bd9f40a5e6813a42e36d5db53b92759c..4500b9ccb02e0ca4c4183e169914f3b2e9743585 100644 (file)
@@ -511,6 +511,11 @@ static int aie2_init(struct amdxdna_dev *xdna)
                return -EINVAL;
        }
 
+       if (!xdna->group) {
+               XDNA_ERR(xdna, "Running without IOMMU not supported");
+               return -EINVAL;
+       }
+
        ndev = drmm_kzalloc(&xdna->ddev, sizeof(*ndev), GFP_KERNEL);
        if (!ndev)
                return -ENOMEM;