]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: qat - add live migration enablers for GEN6 devices
authorMałgorzata Mielnik <malgorzata.mielnik@intel.com>
Tue, 1 Jul 2025 09:47:30 +0000 (10:47 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Jul 2025 10:51:59 +0000 (20:51 +1000)
The current implementation of the QAT live migration enablers is exclusive
to QAT GEN4 devices and resides within QAT GEN4 specific files. However,
the underlying mechanisms, such as the relevant CSRs and offsets,
can be shared between QAT GEN4 and QAT GEN6 devices.

Add the necessary enablers required to implement live migration for QAT
GEN6 devices to the abstraction layer to allow leveraging the existing
QAT GEN4 implementation.

Signed-off-by: Małgorzata Mielnik <malgorzata.mielnik@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c
drivers/crypto/intel/qat/qat_common/adf_gen6_shared.c
drivers/crypto/intel/qat/qat_common/adf_gen6_shared.h

index 435d2ff38ab3ad2b73b1719eab2bfc0543d213fc..4d93d5a56ba33cf9e12f3e4ff48491873983dbe6 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <adf_accel_devices.h>
 #include <adf_admin.h>
+#include <adf_bank_state.h>
 #include <adf_cfg.h>
 #include <adf_cfg_services.h>
 #include <adf_clock.h>
@@ -842,6 +843,8 @@ void adf_init_hw_data_6xxx(struct adf_hw_device_data *hw_data)
        hw_data->disable_iov = adf_disable_sriov;
        hw_data->ring_pair_reset = ring_pair_reset;
        hw_data->dev_config = dev_config;
+       hw_data->bank_state_save = adf_bank_state_save;
+       hw_data->bank_state_restore = adf_bank_state_restore;
        hw_data->get_hb_clock = get_heartbeat_clock;
        hw_data->num_hb_ctrs = ADF_NUM_HB_CNT_PER_AE;
        hw_data->start_timer = adf_timer_start;
@@ -853,6 +856,7 @@ void adf_init_hw_data_6xxx(struct adf_hw_device_data *hw_data)
        adf_gen6_init_hw_csr_ops(&hw_data->csr_ops);
        adf_gen6_init_pf_pfvf_ops(&hw_data->pfvf_ops);
        adf_gen6_init_dc_ops(&hw_data->dc_ops);
+       adf_gen6_init_vf_mig_ops(&hw_data->vfmig_ops);
        adf_gen6_init_ras_ops(&hw_data->ras_ops);
 }
 
index 58a072e2f93621f1c52804897f5a06f4176319ff..c9b151006dcaeea3056dcea4ebe3434e74cfb80e 100644 (file)
@@ -5,6 +5,7 @@
 #include "adf_gen4_config.h"
 #include "adf_gen4_hw_csr_data.h"
 #include "adf_gen4_pfvf.h"
+#include "adf_gen4_vf_mig.h"
 #include "adf_gen6_shared.h"
 
 struct adf_accel_dev;
@@ -47,3 +48,9 @@ int adf_gen6_no_dev_config(struct adf_accel_dev *accel_dev)
        return adf_no_dev_config(accel_dev);
 }
 EXPORT_SYMBOL_GPL(adf_gen6_no_dev_config);
+
+void adf_gen6_init_vf_mig_ops(struct qat_migdev_ops *vfmig_ops)
+{
+       adf_gen4_init_vf_mig_ops(vfmig_ops);
+}
+EXPORT_SYMBOL_GPL(adf_gen6_init_vf_mig_ops);
index bc8e71e984fc798f3cd524baff9427d55d27c2b4..fc6fad029a70d77dd2ed3303c74256c2994709ec 100644 (file)
@@ -4,6 +4,7 @@
 #define ADF_GEN6_SHARED_H_
 
 struct adf_hw_csr_ops;
+struct qat_migdev_ops;
 struct adf_accel_dev;
 struct adf_pfvf_ops;
 
@@ -12,4 +13,5 @@ void adf_gen6_init_hw_csr_ops(struct adf_hw_csr_ops *csr_ops);
 int adf_gen6_cfg_dev_init(struct adf_accel_dev *accel_dev);
 int adf_gen6_comp_dev_config(struct adf_accel_dev *accel_dev);
 int adf_gen6_no_dev_config(struct adf_accel_dev *accel_dev);
+void adf_gen6_init_vf_mig_ops(struct qat_migdev_ops *vfmig_ops);
 #endif/* ADF_GEN6_SHARED_H_ */