Skip to contentSkip to conversation

s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP

PATCH Applied Krzysztof Kozlowski 2 participants 2 messages Aug 5, 2020 – Aug 6, 2020 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP

The VFIO_AP uses ap_driver_register() (and deregister) functions implemented in ap_bus.c (compiled into ap.o). However the ap.o will be built only if CONFIG_ZCRYPT is selected.

This was not visible before commit e93a1695d7fb ("iommu: Enable compile testing for some of drivers") because the CONFIG_VFIO_AP depends on CONFIG_S390_AP_IOMMU which depends on the missing CONFIG_ZCRYPT. After adding COMPILE_TEST, it is possible to select a configuration with VFIO_AP and S390_AP_IOMMU but without the ZCRYPT.

Add proper dependency to the VFIO_AP to fix build errors:

ERROR: modpost: "ap_driver_register" [drivers/s390/crypto/vfio_ap.ko] undefined!
ERROR: modpost: "ap_driver_unregister" [drivers/s390/crypto/vfio_ap.ko] undefined!

Fixes e93a1695d7fb ("iommu: Enable compile testing for some of drivers")
---
 arch/s390/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/s390/Kconfig +1 -0
index 8c0b52940165..2a31a5e74e42 100644
@@ -766,6 +766,7 @@ config VFIO_AP
 	def_tristate n
 	prompt "VFIO support for AP devices"
 	depends on S390_AP_IOMMU && VFIO_MDEV_DEVICE && KVM
+	depends on ZCRYPT
 	help
 		This driver grants access to Adjunct Processor (AP) devices
 		via the VFIO mediated device interface.
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Krzysztof Kozlowski

The VFIO_AP uses ap_driver_register() (and deregister) functions implemented in ap_bus.c (compiled into ap.o). However the ap.o will be built only if CONFIG_ZCRYPT is selected.

This was not visible before commit e93a1695d7fb ("iommu: Enable compile testing for some of drivers") because the CONFIG_VFIO_AP depends on CONFIG_S390_AP_IOMMU which depends on the missing CONFIG_ZCRYPT. After adding COMPILE_TEST, it is possible to select a configuration with VFIO_AP and S390_AP_IOMMU but without the ZCRYPT.

Add proper dependency to the VFIO_AP to fix build errors:

ERROR: modpost: "ap_driver_register" [drivers/s390/crypto/vfio_ap.ko] undefined!
ERROR: modpost: "ap_driver_unregister" [drivers/s390/crypto/vfio_ap.ko] undefined!

Quoted 6 lines
Fixes e93a1695d7fb ("iommu: Enable compile testing for some of drivers")
---
 arch/s390/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.