mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
iommu/amd: fix SEV-TIO support reporting
Commiteeb934137d("iommu/amd: Report SEV-TIO support") was confused about the config options that expose amd_iommu_sev_tio_supported(), and made the declaration (and alternative dummy function) conditional on the CONFIG_AMD_IOMMU config option. But the code is actually dependent on CONFIG_KVM_AMD_SEV, resulting in ERROR: modpost: "amd_iommu_sev_tio_supported" [drivers/crypto/ccp/ccp.ko] undefined! make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1 if you have the AMD iommu enabled, but don't enable KVM_AMD_SEV support. Fix it by moving the declaration into the right #ifdef section in the header file. Fixes:eeb934137d("iommu/amd: Report SEV-TIO support") Cc: Alexey Kardashevskiy <aik@amd.com> Cc: Joerg Roedel <joerg.roedel@amd.com> Cc: Vasant Hegde <vasant.hegde@amd.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -18,12 +18,10 @@ struct task_struct;
|
|||||||
struct pci_dev;
|
struct pci_dev;
|
||||||
|
|
||||||
extern void amd_iommu_detect(void);
|
extern void amd_iommu_detect(void);
|
||||||
extern bool amd_iommu_sev_tio_supported(void);
|
|
||||||
|
|
||||||
#else /* CONFIG_AMD_IOMMU */
|
#else /* CONFIG_AMD_IOMMU */
|
||||||
|
|
||||||
static inline void amd_iommu_detect(void) { }
|
static inline void amd_iommu_detect(void) { }
|
||||||
static inline bool amd_iommu_sev_tio_supported(void) { return false; }
|
|
||||||
|
|
||||||
#endif /* CONFIG_AMD_IOMMU */
|
#endif /* CONFIG_AMD_IOMMU */
|
||||||
|
|
||||||
@@ -72,8 +70,10 @@ struct amd_iommu *get_amd_iommu(unsigned int idx);
|
|||||||
|
|
||||||
#ifdef CONFIG_KVM_AMD_SEV
|
#ifdef CONFIG_KVM_AMD_SEV
|
||||||
int amd_iommu_snp_disable(void);
|
int amd_iommu_snp_disable(void);
|
||||||
|
extern bool amd_iommu_sev_tio_supported(void);
|
||||||
#else
|
#else
|
||||||
static inline int amd_iommu_snp_disable(void) { return 0; }
|
static inline int amd_iommu_snp_disable(void) { return 0; }
|
||||||
|
static inline bool amd_iommu_sev_tio_supported(void) { return false; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _ASM_X86_AMD_IOMMU_H */
|
#endif /* _ASM_X86_AMD_IOMMU_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user