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