diff mbox series

crypto: qat - fix linking errors when PCI_IOV is disabled

Message ID 20240610143756.2031626-1-xin.zeng@intel.com
State Accepted
Commit a5d8922ab2aec39336ebc78d7cefe3b84647b058
Headers show
Series crypto: qat - fix linking errors when PCI_IOV is disabled | expand

Commit Message

Xin Zeng June 10, 2024, 2:37 p.m. UTC
When CONFIG_PCI_IOV=n, the build of the QAT vfio pci variant driver
fails reporting the following linking errors:

    ERROR: modpost: "qat_vfmig_open" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_resume" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_save_state" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_suspend" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_load_state" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_reset" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_save_setup" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_destroy" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_close" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    ERROR: modpost: "qat_vfmig_cleanup" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
    WARNING: modpost: suppressed 1 unresolved symbol warnings because there were too many)

Make live migration helpers provided by QAT PF driver always available
even if CONFIG_PCI_IOV is not selected. This does not cause any side
effect.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/lkml/20240607153406.60355e6c.alex.williamson@redhat.com/T/
Fixes: bb208810b1ab ("vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices")
Signed-off-by: Xin Zeng <xin.zeng@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
 drivers/crypto/intel/qat/qat_common/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: ed00b94dc9e7befd6a77038bd351e0370f73f22c

Comments

Tian, Kevin June 17, 2024, 3:29 a.m. UTC | #1
> From: Zeng, Xin <xin.zeng@intel.com>
> Sent: Monday, June 10, 2024 10:38 PM
> 
> When CONFIG_PCI_IOV=n, the build of the QAT vfio pci variant driver
> fails reporting the following linking errors:
> 
>     ERROR: modpost: "qat_vfmig_open" [drivers/vfio/pci/qat/qat_vfio_pci.ko]
> undefined!
>     ERROR: modpost: "qat_vfmig_resume"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_save_state"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_suspend"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_load_state"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_reset" [drivers/vfio/pci/qat/qat_vfio_pci.ko]
> undefined!
>     ERROR: modpost: "qat_vfmig_save_setup"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_destroy"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_close" [drivers/vfio/pci/qat/qat_vfio_pci.ko]
> undefined!
>     ERROR: modpost: "qat_vfmig_cleanup"
> [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     WARNING: modpost: suppressed 1 unresolved symbol warnings because
> there were too many)
> 
> Make live migration helpers provided by QAT PF driver always available
> even if CONFIG_PCI_IOV is not selected. This does not cause any side
> effect.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Closes:
> https://lore.kernel.org/lkml/20240607153406.60355e6c.alex.williamson@re
> dhat.com/T/
> Fixes: bb208810b1ab ("vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF
> devices")
> Signed-off-by: Xin Zeng <xin.zeng@intel.com>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Herbert Xu June 21, 2024, 12:28 p.m. UTC | #2
On Mon, Jun 10, 2024 at 10:37:56PM +0800, Xin Zeng wrote:
> When CONFIG_PCI_IOV=n, the build of the QAT vfio pci variant driver
> fails reporting the following linking errors:
> 
>     ERROR: modpost: "qat_vfmig_open" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_resume" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_save_state" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_suspend" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_load_state" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_reset" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_save_setup" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_destroy" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_close" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     ERROR: modpost: "qat_vfmig_cleanup" [drivers/vfio/pci/qat/qat_vfio_pci.ko] undefined!
>     WARNING: modpost: suppressed 1 unresolved symbol warnings because there were too many)
> 
> Make live migration helpers provided by QAT PF driver always available
> even if CONFIG_PCI_IOV is not selected. This does not cause any side
> effect.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Closes: https://lore.kernel.org/lkml/20240607153406.60355e6c.alex.williamson@redhat.com/T/
> Fixes: bb208810b1ab ("vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices")
> Signed-off-by: Xin Zeng <xin.zeng@intel.com>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---
>  drivers/crypto/intel/qat/qat_common/Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/intel/qat/qat_common/Makefile b/drivers/crypto/intel/qat/qat_common/Makefile
index 6f9266edc9f1..eac73cbfdd38 100644
--- a/drivers/crypto/intel/qat/qat_common/Makefile
+++ b/drivers/crypto/intel/qat/qat_common/Makefile
@@ -39,7 +39,8 @@  intel_qat-objs := adf_cfg.o \
 	adf_sysfs_rl.o \
 	qat_uclo.o \
 	qat_hal.o \
-	qat_bl.o
+	qat_bl.o \
+	qat_mig_dev.o
 
 intel_qat-$(CONFIG_DEBUG_FS) += adf_transport_debug.o \
 				adf_fw_counters.o \
@@ -56,6 +57,6 @@  intel_qat-$(CONFIG_DEBUG_FS) += adf_transport_debug.o \
 intel_qat-$(CONFIG_PCI_IOV) += adf_sriov.o adf_vf_isr.o adf_pfvf_utils.o \
 			       adf_pfvf_pf_msg.o adf_pfvf_pf_proto.o \
 			       adf_pfvf_vf_msg.o adf_pfvf_vf_proto.o \
-			       adf_gen2_pfvf.o adf_gen4_pfvf.o qat_mig_dev.o
+			       adf_gen2_pfvf.o adf_gen4_pfvf.o
 
 intel_qat-$(CONFIG_CRYPTO_DEV_QAT_ERROR_INJECTION) += adf_heartbeat_inject.o