iommu/amd: Factor out helper for manipulating IRTE GA/CPU info
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:44 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:38 +0000 (09:50 -0700)
commit0b2b541fa3cd85bb06fdd9353764673aa2bfd54a
tree337f9cc9fbfe1279c4229a58bc56de7efb576e71
parent08d9ccdd1a5c75d7aca7ac3af56f723d780dd6ac
iommu/amd: Factor out helper for manipulating IRTE GA/CPU info

Split the guts of amd_iommu_update_ga() to a dedicated helper so that the
logic can be shared with flows that put the IRTE into posted mode.

Opportunistically move amd_iommu_update_ga() and its new helper above
amd_iommu_activate_guest_mode() so that it's all co-located.

Link: https://lore.kernel.org/r/20250611224604.313496-43-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
drivers/iommu/amd/iommu.c