Ashish Kalra 04d65a9dbb iommu/amd: Don't rely on external callers to enable IOMMU SNP support
Currently, the expectation is that the kernel will call
amd_iommu_snp_enable() to perform various checks and set the
amd_iommu_snp_en flag that the IOMMU uses to adjust its setup routines
to account for additional requirements on hosts where SNP is enabled.

This is somewhat fragile as it relies on this call being done prior to
IOMMU setup. It is more robust to just do this automatically as part of
IOMMU initialization, so rework the code accordingly.

There is still a need to export information about whether or not the
IOMMU is configured in a manner compatible with SNP, so relocate the
existing amd_iommu_snp_en flag so it can be used to convey that
information in place of the return code that was previously provided by
calls to amd_iommu_snp_enable().

While here, also adjust the kernel messages related to IOMMU SNP
enablement for consistency/grammar/clarity.

Suggested-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Co-developed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20240126041126.1927228-4-michael.roth@amd.com
2024-01-29 17:19:28 +01:00
..
2024-01-18 16:22:43 -08:00
2024-01-12 11:32:19 -08:00
2024-01-18 17:25:39 -08:00
2024-01-26 15:19:43 -08:00
2024-01-18 11:37:24 -08:00
2024-01-10 08:45:22 -08:00
2024-01-20 15:03:25 -08:00
2024-01-18 09:48:40 -08:00
2024-01-26 13:52:18 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 11:37:24 -08:00
2024-01-12 14:45:13 -08:00
2024-01-09 16:32:11 -08:00
2024-01-18 11:37:24 -08:00
2024-01-12 13:52:21 -08:00
2024-01-18 17:21:35 -08:00
2024-01-18 11:37:24 -08:00
2024-01-10 16:43:55 -08:00
2024-01-17 15:25:27 -08:00
2024-01-24 22:58:00 -08:00
2024-01-18 15:16:57 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 18:22:40 -08:00
2024-01-18 15:16:57 -08:00
2024-01-05 15:55:41 +05:30
2024-01-18 16:22:43 -08:00
2024-01-09 16:12:44 -08:00
2024-01-18 17:11:43 -08:00
2024-01-18 09:48:40 -08:00
2024-01-17 14:37:40 -08:00
2024-01-12 14:59:50 -08:00
2024-01-11 11:31:46 -08:00
2024-01-20 09:42:32 -08:00
2024-01-18 17:08:31 -08:00
2024-01-20 09:42:32 -08:00
2024-01-20 09:42:32 -08:00
2024-01-04 17:03:47 +01:00
2024-01-18 11:43:55 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 15:57:25 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 16:44:03 -08:00
2024-01-12 13:32:30 -08:00
2024-01-17 13:41:38 -08:00
2024-01-12 12:38:37 +01:00