Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Raul Rangel <rrangel@chromium.org>
Cc: Joerg Roedel <jroedel@suse.de>,
	linux-mmc@vger.kernel.org, Tom Murphy <murphyt7@tcd.ie>,
	Douglas Anderson <dianders@chromium.org>,
	evgreen@chromium.org, Daniel Kurtz <djkurtz@chromium.org>
Subject: Re: Problems using AMD eMMC with AMD IOMMU
Date: Fri, 8 May 2020 21:53:26 +0300	[thread overview]
Message-ID: <20200508185326.GN185537@smile.fi.intel.com> (raw)
In-Reply-To: <CAHQZ30CHSYYZS8TBrKXw_QTEUk+Afbazwko34fdjyi0+Xm+OHw@mail.gmail.com>

On Fri, May 08, 2020 at 10:59:37AM -0600, Raul Rangel wrote:
> It looks like the ACPI matching logic was changed.
> 
> With ToT we get:
> ```
> [   13.099631] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id:
> Checking ACPI HID Map.
> [   13.108542] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id:
> p->hid: AMDI0040, p->uid: .
> [   13.117936] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id: No match!
> ```
> 
> If I revert [iommu/amd: Switch to use
> acpi_dev_hid_uid_match()](https://github.com/torvalds/linux/commit/ae5e6c6439c3d0ac8e9c71523790ba1ff6887894)
> the matching works.

Thank you for report.

It seems the _UID() in case of matching is present and not empty ("0" vs. "").
The question is why we have no UID is not there?

I will look at it later.

The quick fix looks like

-		if (acpi_dev_hid_uid_match(adev, p->hid, p->uid)) {
+		if (acpi_dev_hid_uid_match(adev, p->hid, *p->uid ? p->uid : NULL)) {

Can you test it?

> ```
> [   13.275305] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id:
> Checking ACPI HID Map.
> [   13.284216] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id:
> p->hid: AMDI0040, p->uid: .
> [   13.293610] platform AMDI0040:00: AMD-Vi: match_hid_uid: dev->hid:
> AMDI0040, dev->uid: 0.
> [   13.302715] platform AMDI0040:00: AMD-Vi: get_acpihid_device_id: Found match!
> ```
> 
> We can see the device is now associated with a group:
> 
> ```
> # find /sys/ -iname iommu
> /sys/devices/platform/AMDI0040:00/iommu
> ```
> 
> ```
> # cat /sys/devices/platform/AMDI0040\:00/iommu_group/reserved_regions
> 0x00000000fee00000 0x00000000feefffff msi
> 0x000000fd00000000 0x000000ffffffffff reserved
> ```

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-05-08 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 21:00 Problems using AMD eMMC with AMD IOMMU Raul Rangel
2020-05-08 15:22 ` Joerg Roedel
2020-05-08 15:46   ` Raul Rangel
2020-05-08 16:59     ` Raul Rangel
2020-05-08 18:53       ` Andy Shevchenko [this message]
2020-05-08 20:31         ` Raul Rangel
2020-05-08 21:09       ` Raul Rangel
2020-05-08 21:44         ` Raul Rangel

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=20200508185326.GN185537@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=djkurtz@chromium.org \
    --cc=evgreen@chromium.org \
    --cc=jroedel@suse.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=murphyt7@tcd.ie \
    --cc=rrangel@chromium.org \
    /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