From: Vasant Hegde <vasant.hegde@amd.com>
To: Ankit Soni <Ankit.Soni@amd.com>,
Joao Martins <joao.m.martins@oracle.com>
Cc: iommu@lists.linux.dev, suravee.suthikulpanit@amd.com,
joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
linux-kernel@vger.kernel.org,
Alejandro Jimenez <alejandro.j.jimenez@oracle.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 1/2] iommu/amd: Add HATDis feature support
Date: Wed, 28 May 2025 17:49:35 +0530 [thread overview]
Message-ID: <3b38fc9d-83c6-4db8-8a83-eb4265796b03@amd.com> (raw)
In-Reply-To: <m5ageqedj5otmfo4yuld4es72esfmlc7vb5htolj5pcffurjl5@mi5xemcd4fgi>
Hi Ankit,
On 5/12/2025 12:00 PM, Ankit Soni wrote:
> Hi,
>
> On Thu, May 08, 2025 at 06:03:44PM +0100, Joao Martins wrote:
>> On 06/05/2025 06:12, Ankit Soni wrote:
>>> On Wed, Apr 30, 2025 at 12:41:04PM +0100, Joao Martins wrote:
>>>>> With intel patch you mentioned above, it seems that it is mostly handling
>>>>> "second stage translation support" disable, which will eventually disable dma
>>>>> translation. And in AMD case, HATDis bit indicates host(v1) translation is not
>>>>> available, then attempt to use guest(v2) translation, and if both page
>>>>> table modes are not available then disable dma tranlation.
>>>>
>>>> OK, I guess it makes sense if HATDis is v1 only.
>>>>
>>>> My other call out was that when we disable dma-translation all together (aka
>>>> both modes), then we shouldn't advertise the IOMMU groups (internally and to
>>>> userspace) by not calling iommu_device_register()/iommu_device_sysfs_add().
>>>>
>>>
>>> Sorry for the late reply. I had cross-checked it; if the probe fails,
>>> then IOMMU groups will not be populated, and eventually, it will not
>>> have significance for calling iommu_device_register()/iommu_device_sysfs_add().
>>>
>>
>> It would nonetheless populate a ivhd entry in sysfs needlessly but with an empty
>> devices list (qemu diff at the tail end for how I checked it; it's only missing
>> the ILLEGAL_DEVICE_TABLE_ENTRY event being generated, but enough to check the
>> first patch with sw iommu) e.g. as far as I checked:
>>
>> $ find /sys | grep ivhd
>> /sys/class/iommu/ivhd0
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/uevent
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/amd-iommu
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/amd-iommu/cap
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/amd-iommu/features
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/devices
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/device
>> /sys/devices/pci0000:00/0000:00:05.0/iommu/ivhd0/subsystem
>>
>
> I was assuming, since iommu is still active for interrupt remapping,
> user may need info for cap and feature using /sys fs.
> @vasant: can you please suggest on this?
I don't have strong preference. But it looks like intel skips populating sysfs
properties. May be we can match the behaviour and skip populating ivdh entries.
-Vasant
next prev parent reply other threads:[~2025-05-28 12:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 6:50 [PATCH 0/2] iommu/amd: Support for HATdis and HATS features Ankit Soni
2025-04-23 6:50 ` [PATCH 1/2] iommu/amd: Add HATDis feature support Ankit Soni
2025-04-24 12:19 ` Joao Martins
2025-04-25 16:25 ` Ankit Soni
2025-04-30 11:41 ` Joao Martins
2025-05-06 5:12 ` Ankit Soni
2025-05-08 17:03 ` Joao Martins
2025-05-12 6:30 ` Ankit Soni
2025-05-28 12:19 ` Vasant Hegde [this message]
2025-05-30 4:32 ` Ankit Soni
2025-04-30 11:52 ` Vasant Hegde
2025-04-30 11:35 ` Vasant Hegde
2025-05-05 6:30 ` Ankit Soni
2025-04-23 6:50 ` [PATCH 2/2] iommu/amd: Add efr[HATS] max v1 page table level Ankit Soni
2025-04-30 11:57 ` Vasant Hegde
2025-05-06 15:27 ` Jason Gunthorpe
2025-05-07 6:24 ` Vasant Hegde
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=3b38fc9d-83c6-4db8-8a83-eb4265796b03@amd.com \
--to=vasant.hegde@amd.com \
--cc=Ankit.Soni@amd.com \
--cc=alejandro.j.jimenez@oracle.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joao.m.martins@oracle.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.