<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/amd-iommu.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-06T19:13:50+00:00</updated>
<entry>
<title>iommu/amd: fix SEV-TIO support reporting</title>
<updated>2025-12-06T19:13:50+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-12-06T19:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e5ea7f61610239fca058011e7d4f342b34d1558'/>
<id>urn:sha1:5e5ea7f61610239fca058011e7d4f342b34d1558</id>
<content type='text'>
Commit eeb934137deb ("iommu/amd: Report SEV-TIO support") was confused
about the config options that expose amd_iommu_sev_tio_supported(), and
made the declaration (and alternative dummy function) conditional on the
CONFIG_AMD_IOMMU config option.

But the code is actually dependent on CONFIG_KVM_AMD_SEV, resulting in

   ERROR: modpost: "amd_iommu_sev_tio_supported" [drivers/crypto/ccp/ccp.ko] undefined!
   make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1

if you have the AMD iommu enabled, but don't enable KVM_AMD_SEV support.

Fix it by moving the declaration into the right #ifdef section in the
header file.

Fixes: eeb934137deb ("iommu/amd: Report SEV-TIO support")
Cc: Alexey Kardashevskiy &lt;aik@amd.com&gt;
Cc: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Cc: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Report SEV-TIO support</title>
<updated>2025-12-02T20:06:45+00:00</updated>
<author>
<name>Alexey Kardashevskiy</name>
<email>aik@amd.com</email>
</author>
<published>2025-12-02T02:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eeb934137debfbe98be61a27756a605edf492ed3'/>
<id>urn:sha1:eeb934137debfbe98be61a27756a605edf492ed3</id>
<content type='text'>
The SEV-TIO switch in the AMD BIOS is reported to the OS via
the IOMMU Extended Feature 2 register (EFR2), bit 1.

Add helper to parse the bit and report the feature presence.

Signed-off-by: Alexey Kardashevskiy &lt;aik@amd.com&gt;
Link: https://patch.msgid.link/20251202024449.542361-4-aik@amd.com
Acked-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: KVM: SVM: Allow KVM to control need for GA log interrupts</title>
<updated>2025-06-23T16:50:51+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:46:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9e53f9ff4a88f01b22524878c9a381a6c5f65ff'/>
<id>urn:sha1:b9e53f9ff4a88f01b22524878c9a381a6c5f65ff</id>
<content type='text'>
Add plumbing to the AMD IOMMU driver to allow KVM to control whether or
not an IRTE is configured to generate GA log interrupts.  KVM only needs a
notification if the target vCPU is blocking, so the vCPU can be awakened.
If a vCPU is preempted or exits to userspace, KVM clears is_run, but will
set the vCPU back to running when userspace does KVM_RUN and/or the vCPU
task is scheduled back in, i.e. KVM doesn't need a notification.

Unconditionally pass "true" in all KVM paths to isolate the IOMMU changes
from the KVM changes insofar as possible.

Opportunistically swap the ordering of parameters for amd_iommu_update_ga()
so that the match amd_iommu_activate_guest_mode().

Note, as of this writing, the AMD IOMMU manual doesn't list GALogIntr as
a non-cached field, but per AMD hardware architects, it's not cached and
can be safely updated without an invalidation.

Link: https://lore.kernel.org/all/b29b8c22-2fd4-4b5e-b755-9198874157c7@amd.com
Cc: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Cc: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Link: https://lore.kernel.org/r/20250611224604.313496-62-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: KVM: SVM: Set pCPU info in IRTE when setting vCPU affinity</title>
<updated>2025-06-23T16:50:39+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f965255dc5033387ac7858787c6c792fd789ac34'/>
<id>urn:sha1:f965255dc5033387ac7858787c6c792fd789ac34</id>
<content type='text'>
Now that setting vCPU affinity is guarded with ir_list_lock, i.e. now that
avic_physical_id_entry can be safely accessed, set the pCPU info
straight-away when setting vCPU affinity.  Putting the IRTE into posted
mode, and then immediately updating the IRTE a second time if the target
vCPU is running is wasteful and confusing.

This also fixes a flaw where a posted IRQ that arrives between putting
the IRTE into guest_mode and setting the correct destination could cause
the IOMMU to ring the doorbell on the wrong pCPU.

Link: https://lore.kernel.org/r/20250611224604.313496-44-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: KVM: SVM: Infer IsRun from validity of pCPU destination</title>
<updated>2025-06-23T16:50:37+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08d9ccdd1a5c75d7aca7ac3af56f723d780dd6ac'/>
<id>urn:sha1:08d9ccdd1a5c75d7aca7ac3af56f723d780dd6ac</id>
<content type='text'>
Infer whether or not a vCPU should be marked running from the validity of
the pCPU on which it is running.  amd_iommu_update_ga() already skips the
IRTE update if the pCPU is invalid, i.e. passing %true for is_run with an
invalid pCPU would be a blatant and egregrious KVM bug.

Tested-by: Sairaj Kodilkar &lt;sarunkod@amd.com&gt;
Link: https://lore.kernel.org/r/20250611224604.313496-42-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu: KVM: Split "struct vcpu_data" into separate AMD vs. Intel structs</title>
<updated>2025-06-23T16:50:31+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53527ea1b70224d16d29edbd5c850456469f00ec'/>
<id>urn:sha1:53527ea1b70224d16d29edbd5c850456469f00ec</id>
<content type='text'>
Split the vcpu_data structure that serves as a handoff from KVM to IOMMU
drivers into vendor specific structures.  Overloading a single structure
makes the code hard to read and maintain, is *very* misleading as it
suggests that mixing vendors is actually supported, and bastardizing
Intel's posted interrupt descriptor address when AMD's IOMMU already has
its own structure is quite unnecessary.

Tested-by: Sairaj Kodilkar &lt;sarunkod@amd.com&gt;
Link: https://lore.kernel.org/r/20250611224604.313496-33-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: KVM: SVM: Use pi_desc_addr to derive ga_root_ptr</title>
<updated>2025-06-23T16:50:24+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4cdbaf9d81c8387da8b9b91567d4b0eb1b8a549'/>
<id>urn:sha1:c4cdbaf9d81c8387da8b9b91567d4b0eb1b8a549</id>
<content type='text'>
Use vcpu_data.pi_desc_addr instead of amd_iommu_pi_data.base to get the
GA root pointer.  KVM is the only source of amd_iommu_pi_data.base, and
KVM's one and only path for writing amd_iommu_pi_data.base computes the
exact same value for vcpu_data.pi_desc_addr and amd_iommu_pi_data.base,
and fills amd_iommu_pi_data.base if and only if vcpu_data.pi_desc_addr is
valid, i.e. amd_iommu_pi_data.base is fully redundant.

Cc: Maxim Levitsky &lt;mlevitsk@redhat.com&gt;
Reviewed-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Tested-by: Sairaj Kodilkar &lt;sarunkod@amd.com&gt;
Link: https://lore.kernel.org/r/20250611224604.313496-23-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: KVM: SVM: Delete now-unused cached/previous GA tag fields</title>
<updated>2025-06-20T20:52:55+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2025-06-11T22:45:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1da19c5ce0533796179d9e1b55e64bf78478c4c1'/>
<id>urn:sha1:1da19c5ce0533796179d9e1b55e64bf78478c4c1</id>
<content type='text'>
Delete the amd_ir_data.prev_ga_tag field now that all usage is
superfluous.

Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Tested-by: Sairaj Kodilkar &lt;sarunkod@amd.com&gt;
Link: https://lore.kernel.org/r/20250611224604.313496-8-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: remove return value of amd_iommu_detect</title>
<updated>2025-01-06T11:42:00+00:00</updated>
<author>
<name>Gao Shiyuan</name>
<email>gaoshiyuan@baidu.com</email>
</author>
<published>2025-01-03T16:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5bb494d5cbb9a3403ba8b1c8bc145b42fc119078'/>
<id>urn:sha1:5bb494d5cbb9a3403ba8b1c8bc145b42fc119078</id>
<content type='text'>
The return value of amd_iommu_detect is not used, so remove it and
is consistent with other iommu detect functions.

Signed-off-by: Gao Shiyuan &lt;gaoshiyuan@baidu.com&gt;
Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Link: https://lore.kernel.org/r/20250103165808.80939-1-gaoshiyuan@baidu.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Clean up RMP entries for IOMMU pages during SNP shutdown</title>
<updated>2024-01-29T19:34:18+00:00</updated>
<author>
<name>Ashish Kalra</name>
<email>ashish.kalra@amd.com</email>
</author>
<published>2024-01-26T04:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f366a8dac1b8fef28a470d4e67b9843ebb8e2a1f'/>
<id>urn:sha1:f366a8dac1b8fef28a470d4e67b9843ebb8e2a1f</id>
<content type='text'>
Add a new IOMMU API interface amd_iommu_snp_disable() to transition
IOMMU pages to Hypervisor state from Reclaim state after SNP_SHUTDOWN_EX
command. Invoke this API from the CCP driver after SNP_SHUTDOWN_EX
command.

Signed-off-by: Ashish Kalra &lt;ashish.kalra@amd.com&gt;
Signed-off-by: Michael Roth &lt;michael.roth@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20240126041126.1927228-20-michael.roth@amd.com
</content>
</entry>
</feed>
