Re: [PATCH] iommu/amd: Clear amd_iommu_snp_en if snp_rmptable_init() fails
From: Vasant Hegde
Date: Mon Nov 02 2026 - 10:38:57 EST
On 10/24/2026 12:20 AM, Dheeraj Kumar Srivastava wrote:
> iommu_snp_enable() checks that the IOMMU can support SNP and sets
> amd_iommu_snp_en, then calls snp_rmptable_init() to map the RMP table.
> If that call fails, CC_ATTR_HOST_SEV_SNP is cleared but amd_iommu_snp_en
> is left set. Later IOMMU initialization uses amd_iommu_snp_en to
> configure the IOMMU for SNP, on the assumption that RMP setup succeeded.
>
> Clear amd_iommu_snp_en along with CC_ATTR_HOST_SEV_SNP.
>
> Fixes: 409f45387c93 ("x86/sev: Fix broken SNP support with KVM module built-in")
> Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
Thanks. Queued for rc.
-Vasant