-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GM Driver Support for Hygon platform Cryptographic Coprocessor #384
Add GM Driver Support for Hygon platform Cryptographic Coprocessor #384
Conversation
hygon inclusion category: feature -------------------------------- In order to add SM2 driver for hygon ccp, relating to SM2_sign, SM2_verify, SM2_encrypt and SM2_decrypt. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- In order to add SM3 driver for hygon ccp, include sm3-hmac. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- In order to add SM4 driver for hygon ccp, relating to sm4 mode of ecb/ecb_hs, cbc/cbc_hs, cfb, ofb and ctr Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- the complete callback 'crypto_req_done' has changed its input parameter, we need update input in ccp-crypto implement. Fixes: acafe30ff58a ("crypto: ccp: Support SM2 algorithm for hygon ccp.") Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- ccp_find_lsb_regions check from vq_1 but status value start from vq_0. Fixes: 4b394a2 ("crypto: ccp - Let a v5 CCP provide the same function as v3") Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- fix the repetitive interrupt (INT_COMPLETION & INT_EMPTY_QUEUE) in one cmd process. Fixes: 6263b51 ("crypto: ccp - Change ISR handler method for a v5 CCP") Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
…cess test. hygon inclusion category: bugfix -------------------------------- we shuld clear interrupt status before set int_revd flag, otherwise, it will cause vq thread stuck when process multi command. Fixes: 4b394a2 ("crypto: ccp - Let a v5 CCP provide the same function as v3") Signed-off-by: Xiangyu Xu <xuxiangyu@hygon.cn> Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
…ding hygon inclusion category: bugfix -------------------------------- Add DER coding support for ccp sm2 sign interface. Fixes: acafe30ff58a ("crypto: ccp: Support SM2 algorithm for hygon ccp.") Signed-off-by: liulanyi <liulanyi@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
…rash hygon inclusion category: bugfix -------------------------------- long data sm2 encryption may cause out of bounds memory access Fixes: acafe30ff58a ("crypto: ccp: Support SM2 algorithm for hygon ccp.") Signed-off-by: liulanyi <liulanyi@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- change command queue size to 8192 to support multipule cmd in hygon ccp Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- optimize sm3 processing performance, the physical page of each sg list corresponds to a CCP cmd, all cmd prepared, then start ccp. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- optimize sm4 processing performance by starting ccp only after all cmd has been prepared Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- remove the repeated sm4-hs mode definition, otherwise, it will caused ccp-crypto module load err in the following version of kernel-6.6, eg. 6.6.20 Fixes: 474d2ff69261 ("crypto: ccp: Support SM4 algorithm for hygon ccp.") Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- 1. support sm2 on 4th cpu 2. create new ccp-dev-v5.c file for hygon ccp only 3. restore original ccp-dev-v5.c file Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- Add the hct.ko driver module to support the HYGON Cryptography Technology (HCT) Engine, which also supports CCP virtualization. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- 1. hct support run vfio-noiommu mode on memmory-encrypt host 2. change wb attribute for the bar memory of hct virtual machine. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- support build hct.ko with only part of features in the virtual env Fixes: ab5c224be459 ("hct: add mediated ccp driver support for hygon crypto technology.") Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- There are more than 16 ccps from Hygon-Gen4 CPU, so the driver need update to support more ccps Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: feature -------------------------------- hct support more process. Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
hygon inclusion category: bugfix -------------------------------- fix fork process in virtual env will cause stuck due to inherrit parent wb info Fixes: bd4bd8459fe2 ("hct: supporting memory encryption in host and wb set in vm") Signed-off-by: Yabin Li <liyabin@hygon.cn> Signed-off-by: yangdepei <yangdepei@hygon.cn>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @Dpy0407. Thanks for your PR. 😃 |
Hi @Dpy0407. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
8fb48ea
into
deepin-community:linux-6.6.y
Description:
Support GM kernel driver for hygon C86-2G C86-3G C86-4G CPU.
the Cryptographic Co-Processor in hygon CPU has implement SM2,SM3,SM4 algo,to use these feature,The corresponding driver needs to be implemented in the kernel.
Support Hygon CCP used via mdev module and support CCP virtualization
we have also implement a user mode crypto sdk named HCT,which support to use on host and virtual env. the hct driver provide in kernel is important for HCT sdk.