]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Add support for AVIC when SNP is enabled
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 26 Jul 2022 13:43:48 +0000 (08:43 -0500)
committerJoerg Roedel <jroedel@suse.de>
Fri, 29 Jul 2022 08:31:06 +0000 (10:31 +0200)
commitde056e82f4fbc34ffd4a0afc10d0fc65a857b39c
tree33d5b75312a3017803671a5a74afa352326c4d56
parent570d8cf7c12271acf97c68dc01b7b844c9e592b4
iommu/amd: Add support for AVIC when SNP is enabled

In order to support AVIC on SNP-enabled system, The IOMMU driver needs to
check EFR2[SNPAVICSup] and enables the support by setting SNPAVICEn bit
in the IOMMU control register (MMIO offset 18h).

For detail, please see section "SEV-SNP Guest Virtual APIC Support" of the
AMD I/O Virtualization Technology (IOMMU) Specification.
(https://www.amd.com/system/files/TechDocs/48882_IOMMU.pdf)

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20220726134348.6438-3-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c