lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH Part2 v6 02/49] iommu/amd: Introduce function to check SEV-SNP support
On Mon, Jun 20, 2022 at 10:59:19PM +0000, Ashish Kalra wrote:
> +bool iommu_sev_snp_supported(void)
> +{
> + struct amd_iommu *iommu;
> +
> + /*
> + * The SEV-SNP support requires that IOMMU must be enabled, and is
> + * not configured in the passthrough mode.
> + */
> + if (no_iommu || iommu_default_passthrough()) {
> + pr_err("SEV-SNP: IOMMU is either disabled or configured in passthrough mode.\n");
> + return false;
> + }
> +
> + /*
> + * Iterate through all the IOMMUs and verify the SNPSup feature is
> + * enabled.
> + */
> + for_each_iommu(iommu) {
> + if (!iommu_feature(iommu, FEATURE_SNP)) {
> + pr_err("SNPSup is disabled (devid: %02x:%02x.%x)\n",
> + PCI_BUS_NUM(iommu->devid), PCI_SLOT(iommu->devid),
> + PCI_FUNC(iommu->devid));
> + return false;
> + }
> + }
> +
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(iommu_sev_snp_supported);

Why is this function exported?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2022-07-01 12:45    [W:1.377 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site