<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/iommu/amd/init.c, branch update-toolchain</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/iommu/amd/init.c?h=update-toolchain</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/iommu/amd/init.c?h=update-toolchain'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2024-06-27T10:14:19Z</updated>
<entry>
<title>iommu/amd: Fix GT feature enablement again</title>
<updated>2024-06-27T10:14:19Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2024-06-21T10:15:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=150bdf5f8d8f805d70bebbbfd07697bd2416771a'/>
<id>urn:sha1:150bdf5f8d8f805d70bebbbfd07697bd2416771a</id>
<content type='text'>
Current code configures GCR3 even when device is attached to identity
domain. So that we can support SVA with identity domain. This means in
attach device path it updates Guest Translation related bits in DTE.

Commit de111f6b4f6a ("iommu/amd: Enable Guest Translation after reading
IOMMU feature register") missed to enable Control[GT] bit in resume
path. Its causing certain laptop to fail to resume after suspend.

This is because we have inconsistency between between control register
(GT is disabled) and DTE (where we have enabled guest translation related
bits) in resume path. And IOMMU hardware throws ILLEGAL_DEV_TABLE_ENTRY.

Fix it by enabling GT bit in resume path.

Reported-by: Błażej Szczygieł &lt;spaz16@wp.pl&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218975
Fixes: de111f6b4f6a ("iommu/amd: Enable Guest Translation after reading IOMMU feature register")
Tested-by: Błażej Szczygieł &lt;spaz16@wp.pl&gt;
Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Reviewed-by: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;
Link: https://lore.kernel.org/r/20240621101533.20216-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Fix panic accessing amd_iommu_enable_faulting</title>
<updated>2024-06-13T09:16:05Z</updated>
<author>
<name>Dimitri Sivanich</name>
<email>sivanich@hpe.com</email>
</author>
<published>2024-05-30T18:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=12243a8115f8583a6bcada7717c01fb164e23c89'/>
<id>urn:sha1:12243a8115f8583a6bcada7717c01fb164e23c89</id>
<content type='text'>
This fixes a bug introduced by commit d74169ceb0d2 ("iommu/vt-d: Allocate
DMAR fault interrupts locally").  The panic happens when
amd_iommu_enable_faulting is called from CPUHP_AP_ONLINE_DYN context.

Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
Signed-off-by: Dimitri Sivanich &lt;sivanich@hpe.com&gt;
Tested-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Reviewed-by: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;
Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Link: https://lore.kernel.org/r/ZljHE/R4KLzGU6vx@hpe.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Fix sysfs leak in iommu init</title>
<updated>2024-06-04T11:50:15Z</updated>
<author>
<name>Kun(llfl)</name>
<email>llfl@linux.alibaba.com</email>
</author>
<published>2024-05-09T00:42:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a295ec52c8624883885396fde7b4df1a179627c3'/>
<id>urn:sha1:a295ec52c8624883885396fde7b4df1a179627c3</id>
<content type='text'>
During the iommu initialization, iommu_init_pci() adds sysfs nodes.
However, these nodes aren't remove in free_iommu_resources() subsequently.

Fixes: 39ab9555c241 ("iommu: Add sysfs bindings for struct iommu_device")
Signed-off-by: Kun(llfl) &lt;llfl@linux.alibaba.com&gt;
Reviewed-by: Suravee Suthikulpanit &lt;suravee.suthikulpanit@amd.com&gt;
Link: https://lore.kernel.org/r/c8e0d11c6ab1ee48299c288009cf9c5dae07b42d.1715215003.git.llfl@linux.alibaba.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branches 'arm/renesas', 'arm/smmu', 'x86/amd', 'core' and 'x86/vt-d' into next</title>
<updated>2024-05-13T12:06:54Z</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2024-05-13T12:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2bd5059c6cc04b02073d4d9f57137ab74e1d8e7a'/>
<id>urn:sha1:2bd5059c6cc04b02073d4d9f57137ab74e1d8e7a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>iommu/amd: Enable Guest Translation after reading IOMMU feature register</title>
<updated>2024-05-06T08:24:18Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2024-05-06T08:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=de111f6b4f6a3010020825d22a068f416bc29c95'/>
<id>urn:sha1:de111f6b4f6a3010020825d22a068f416bc29c95</id>
<content type='text'>
Commit 8e0179733172 ("iommu/amd: Enable Guest Translation before
registering devices") moved IOMMU Guest Translation (GT) enablement to
early init path. It does feature check based on Global EFR value (got from
ACPI IVRS table). Later it adjusts EFR value based on IOMMU feature
register (late_iommu_features_init()).

It seems in some systems BIOS doesn't set gloabl EFR value properly.
This is causing mismatch. Hence move IOMMU GT enablement after
late_iommu_features_init() so that it does check based on IOMMU EFR
value.

Fixes: 8e0179733172 ("iommu/amd: Enable Guest Translation before registering devices")
Reported-by: Klara Modin &lt;klarasmodin@gmail.com&gt;
Closes: https://lore.kernel.org/linux-iommu/333e6eb6-361c-4afb-8107-2573324bf689@gmail.com/
Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Tested-by: Klara Modin &lt;klarasmodin@gmail.com&gt;
Link: https://lore.kernel.org/r/20240506082039.7575-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'memory-observability' into x86/amd</title>
<updated>2024-04-26T10:54:13Z</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2024-04-26T10:54:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5dc72c8a146ddcfc568265c8088e90d8e996d340'/>
<id>urn:sha1:5dc72c8a146ddcfc568265c8088e90d8e996d340</id>
<content type='text'>
</content>
</entry>
<entry>
<title>iommu/amd: Define per-IOMMU iopf_queue</title>
<updated>2024-04-26T10:16:01Z</updated>
<author>
<name>Suravee Suthikulpanit</name>
<email>suravee.suthikulpanit@amd.com</email>
</author>
<published>2024-04-18T10:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=61928bab9d26b147d41d9b9a4d2328d0e1d6c0c0'/>
<id>urn:sha1:61928bab9d26b147d41d9b9a4d2328d0e1d6c0c0</id>
<content type='text'>
AMD IOMMU hardware supports PCI Peripheral Paging Request (PPR) using
a PPR log, which is a circular buffer containing requests from downstream
end-point devices.

There is one PPR log per IOMMU instance. Therefore, allocate an iopf_queue
per IOMMU instance during driver initialization, and free the queue during
driver deinitialization.

Also rename enable_iommus_v2() -&gt; enable_iommus_ppr() to reflect its
usage. And add amd_iommu_gt_ppr_supported() check before enabling PPR
log.

Signed-off-by: Suravee Suthikulpanit &lt;suravee.suthikulpanit@amd.com&gt;
Co-developed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240418103400.6229-10-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Move PPR-related functions into ppr.c</title>
<updated>2024-04-26T10:15:57Z</updated>
<author>
<name>Suravee Suthikulpanit</name>
<email>suravee.suthikulpanit@amd.com</email>
</author>
<published>2024-04-18T10:33:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e08fcd901c4301c150a8212df28df7f4d4811988'/>
<id>urn:sha1:e08fcd901c4301c150a8212df28df7f4d4811988</id>
<content type='text'>
In preparation to subsequent PPR-related patches, and also remove static
declaration for certain helper functions so that it can be reused in other
files.

Also rename below functions:
  alloc_ppr_log        -&gt; amd_iommu_alloc_ppr_log
  iommu_enable_ppr_log -&gt; amd_iommu_enable_ppr_log
  free_ppr_log         -&gt; amd_iommu_free_ppr_log
  iommu_poll_ppr_log   -&gt; amd_iommu_poll_ppr_log

Signed-off-by: Suravee Suthikulpanit &lt;suravee.suthikulpanit@amd.com&gt;
Co-developed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240418103400.6229-5-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Rename amd_iommu_v2_supported() as amd_iommu_pasid_supported()</title>
<updated>2024-04-26T10:15:55Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2024-04-18T10:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9433d5b2ace529d8a66863d4b5127c6c4ca6e4c2'/>
<id>urn:sha1:9433d5b2ace529d8a66863d4b5127c6c4ca6e4c2</id>
<content type='text'>
To reflect its usage. No functional changes intended.

Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240418103400.6229-2-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/vt-d: Allocate DMAR fault interrupts locally</title>
<updated>2024-04-26T09:57:36Z</updated>
<author>
<name>Dimitri Sivanich</name>
<email>sivanich@hpe.com</email>
</author>
<published>2024-04-24T07:16:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d74169ceb0d2e32438946a2f1f9fc8c803304bd6'/>
<id>urn:sha1:d74169ceb0d2e32438946a2f1f9fc8c803304bd6</id>
<content type='text'>
The Intel IOMMU code currently tries to allocate all DMAR fault interrupt
vectors on the boot cpu.  On large systems with high DMAR counts this
results in vector exhaustion, and most of the vectors are not initially
allocated socket local.

Instead, have a cpu on each node do the vector allocation for the DMARs on
that node.  The boot cpu still does the allocation for its node during its
boot sequence.

Signed-off-by: Dimitri Sivanich &lt;sivanich@hpe.com&gt;
Reviewed-by: Kevin Tian &lt;kevin.tian@intel.com&gt;
Link: https://lore.kernel.org/r/Zfydpp2Hm+as16TY@hpe.com
Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
</feed>
