public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Lizhi Hou <lizhi.hou@amd.com>,
	ogabbay@kernel.org, quic_jhugo@quicinc.com,
	dri-devel@lists.freedesktop.org, karol.wachowski@linux.intel.com
Cc: linux-kernel@vger.kernel.org, max.zhen@amd.com, sonal.santan@amd.com
Subject: Re: [PATCH V1] accel/amdxdna: Block running when IOMMU is off
Date: Wed, 20 May 2026 23:32:43 -0500	[thread overview]
Message-ID: <3154ab4f-1808-4e8c-a7a2-128938d52299@amd.com> (raw)
In-Reply-To: <88097167-1bf9-235a-36dc-467207ee63c6@amd.com>



On 5/20/26 22:43, Lizhi Hou wrote:
> 
> On 5/20/26 17:57, Mario Limonciello wrote:
>>
>>
>> On 5/20/26 17:35, Lizhi Hou wrote:
>>> The AIE2 device firmware requires IOMMU on.
>>>
>>> Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5319
>>> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
>>> ---
>>>   drivers/accel/amdxdna/aie2_pci.c | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/ 
>>> amdxdna/aie2_pci.c
>>> index c4d345d4c76b..22f66c7f534d 100644
>>> --- a/drivers/accel/amdxdna/aie2_pci.c
>>> +++ b/drivers/accel/amdxdna/aie2_pci.c
>>> @@ -490,6 +490,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;
>>
>> I think it would be better to change the return for amdxdna_iommu_init().
> 
> amdxdna_iommu_init() is common code for all kinds of hardware. I would 
> keep the check only for AIE2 now, which is known to require IOMMU on.
Got it.  Then this makes sense.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> 
> Lizhi
> 
>>
>> This has a check that lets !xdna->group pass; which can be turned into 
>> an error code instead.


  reply	other threads:[~2026-05-21  4:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 22:35 [PATCH V1] accel/amdxdna: Block running when IOMMU is off Lizhi Hou
2026-05-21  0:57 ` Mario Limonciello
2026-05-21  3:43   ` Lizhi Hou
2026-05-21  4:32     ` Mario Limonciello [this message]
2026-05-21 17:28       ` Lizhi Hou
2026-05-25 11:10 ` Claude review: " Claude Code Review Bot
2026-05-25 11:10 ` Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3154ab4f-1808-4e8c-a7a2-128938d52299@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karol.wachowski@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=max.zhen@amd.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=sonal.santan@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox