* [PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920
@ 2021-01-05 6:12 Kai Ye
2021-01-14 6:46 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Kai Ye @ 2021-01-05 6:12 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto, linux-kernel
Kunpeng920 SEC/HPRE/ZIP cannot support running user space SVA and kernel
Crypto at the same time. Therefore, the algorithms should not be registered
to Crypto as user space SVA is enabled.
Signed-off-by: Kai Ye <yekai13@huawei.com>
Reviewed-by: Zaibo Xu <xuzaibo@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
---
drivers/crypto/hisilicon/qm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index f21ccae..10a04ab 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -4004,6 +4004,9 @@ int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list)
{
int flag = 0;
int ret = 0;
+ /* HW V2 not support both use uacce sva mode and hardware crypto algs */
+ if (qm->ver <= QM_HW_V2 && qm->use_sva)
+ return 0;
mutex_lock(&qm_list->lock);
if (list_empty(&qm_list->list))
@@ -4035,6 +4038,9 @@ EXPORT_SYMBOL_GPL(hisi_qm_alg_register);
*/
void hisi_qm_alg_unregister(struct hisi_qm *qm, struct hisi_qm_list *qm_list)
{
+ if (qm->ver <= QM_HW_V2 && qm->use_sva)
+ return;
+
mutex_lock(&qm_list->lock);
list_del(&qm->list);
mutex_unlock(&qm_list->lock);
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920
2021-01-05 6:12 [PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920 Kai Ye
@ 2021-01-14 6:46 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-01-14 6:46 UTC (permalink / raw)
To: Kai Ye; +Cc: linux-crypto, linux-kernel
On Tue, Jan 05, 2021 at 02:12:03PM +0800, Kai Ye wrote:
> Kunpeng920 SEC/HPRE/ZIP cannot support running user space SVA and kernel
> Crypto at the same time. Therefore, the algorithms should not be registered
> to Crypto as user space SVA is enabled.
>
> Signed-off-by: Kai Ye <yekai13@huawei.com>
> Reviewed-by: Zaibo Xu <xuzaibo@huawei.com>
> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
> ---
> drivers/crypto/hisilicon/qm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-14 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 6:12 [PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920 Kai Ye
2021-01-14 6:46 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).