Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5200771rwb; Sun, 4 Dec 2022 16:36:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4q2RF42iAJh0MOAbbe8lORC9E5wT+BiShHGYGfSB441iulVHP+7BmOJgSAoIQ/BcYtrjvK X-Received: by 2002:a17:902:f807:b0:189:c9ed:6072 with SMTP id ix7-20020a170902f80700b00189c9ed6072mr7404107plb.159.1670200612397; Sun, 04 Dec 2022 16:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670200612; cv=none; d=google.com; s=arc-20160816; b=P2xIvmqP4KhebtxAqQblwo68faMLO2skI8e4dirwDPVTAi6oQYFL12ZW4BX8DkihkZ OkHnEwbJRNknmOUhmOQa2MJ1ktbihTl2yDGUaQP3PLacxjnXarWKvvmV8dTsgIpbYm6u NAmw3F5BIE2klPKujjGcyKcpKxKS9V5iwxzDPPf3pEn55OsyxpWndqDA/xSyUZliS2he ys8/6A92alxZh3Eok58V0AzRGDMI0nwWnWlOa6Bc2SQiQUvrXfFsY15CYTPRTwYh4xwt R2w8VfS7SfMxmwS9ZII5FNuIHz6g7kQBkBJQ8qYcO+sO9Q1EEMe1kt/Vll+UtlCCYCkF JotA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ww2kztcN/J/ICRB7ps8+D5a4H/sLs5jeOgAdPXpmvsg=; b=GB+akAMmKo/2yXrj7qguHpY5QEGPLCVzm9dU+D2glyCBPzrkIDX4P0tXgAaH4E9hjz X/0mI64x9IfySqEuZfqYJSlbLAMXUjWihZVEYhnTDPDnyneF1NUH3heIRKNP5G4uZ0QR x4ZknhhZQxIZWFYT2NTiai3eilTmhNLyqeAJznshlwZBXh9M1Ie3QpHGz+S12C7ec3kD olDdpARAqGZPwmBCMv/Po5tGgQfWBqCsbtREf+Nx072p/18kMximCvbrH5eWRD9sEUHw 2nylmMR38CDdkBmItOsm30LyAZF305hCEMyYo0AUZd+je5CzO2+VoNiCCyjgcPcZgIBh t5WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gWoq2HYB; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a170902a40f00b0017535568d5dsi12154553plq.256.2022.12.04.16.36.38; Sun, 04 Dec 2022 16:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gWoq2HYB; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbiLEAfR (ORCPT + 99 others); Sun, 4 Dec 2022 19:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbiLEAfP (ORCPT ); Sun, 4 Dec 2022 19:35:15 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4325ADF03; Sun, 4 Dec 2022 16:35:13 -0800 (PST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B4LOElN031367; Mon, 5 Dec 2022 00:35:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=Ww2kztcN/J/ICRB7ps8+D5a4H/sLs5jeOgAdPXpmvsg=; b=gWoq2HYBaKpoQD9P7DxNjjU6AB4Z+dbylX0Zvli4CX8D6516u23kS/Ld9ZsOd3I3y0S+ WqCCbgCZtee3zUXK/UwiEpBcUUGqYUAqPhQOXE0s+cnfM4tABTdhPm7PUYpRFjpMaviG 9z6wZQ0fiW7DVrFdRxfLAbQBLsFiddxh0I8InNyUo/LrvicEfAjDb0iWkXA7hlS3CbPG e5XI19LqDOzfQPpD0TlhYAvg6DgFcpRfjOgdL4BipbrOAxD7AXkjniIdv0npW6SZxTII 6sA8KfgHcWx/9IjN9cxKFtBrZsBcB2xzWn+PKp3x+xPmoqXbvFqMyyZGDwmQIS3OANW/ DA== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m8gd0u98q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Dec 2022 00:35:05 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B50LA4S010889; Mon, 5 Dec 2022 00:35:04 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([9.208.129.114]) by ppma02wdc.us.ibm.com with ESMTP id 3m7x39j8s6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Dec 2022 00:35:04 +0000 Received: from smtpav06.wdc07v.mail.ibm.com (smtpav06.wdc07v.mail.ibm.com [10.39.53.233]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B50Z2AW16908872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Dec 2022 00:35:02 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A23865804E; Mon, 5 Dec 2022 00:35:02 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E85258055; Mon, 5 Dec 2022 00:35:02 +0000 (GMT) Received: from ltcden12-lp3.aus.stglabs.ibm.com (unknown [9.40.195.53]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 5 Dec 2022 00:35:02 +0000 (GMT) From: Danny Tsen To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, leitao@debian.org, nayna@linux.ibm.com, appro@cryptogams.org, linux-kernel@vger.kernel.org, ltcgcw@linux.vnet.ibm.com, dtsen@linux.ibm.com Subject: [PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation Date: Sun, 4 Dec 2022 19:34:52 -0500 Message-Id: <20221205003458.4182-1-dtsen@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: TPuqeMhfML8WLHhkff2iLGRNSqRTA_fI X-Proofpoint-ORIG-GUID: TPuqeMhfML8WLHhkff2iLGRNSqRTA_fI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-04_16,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 mlxlogscore=582 bulkscore=0 spamscore=0 adultscore=0 priorityscore=1501 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212050001 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch series enable an accelerated AES/GCM stitched implementation for Power10+ CPU(ppc64le). This module supports AEAD algorithm. The stitched implementation provides 3.5X+ better performance than the baseline. This patch has been tested with the kernel crypto module tcrypt.ko and has passed the selftest. The patch is also tested with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled Danny Tsen (6): Patch1: Update Kconfig and Makefile. Patch2: Glue code for AES/GCM stitched implementation. Patch3: An accelerated AES/GCM stitched implementation. Patch4: Supporting functions for AES. Patch5: Supporting functions for ghash. Patch6: A perl script to process PowerPC assembler source. arch/powerpc/crypto/Kconfig | 11 + arch/powerpc/crypto/Makefile | 10 + arch/powerpc/crypto/aesp8-ppc.pl | 3846 ++++++++++++++++++++++++ arch/powerpc/crypto/ghashp8-ppc.pl | 370 +++ arch/powerpc/crypto/p10-aes-gcm-glue.c | 345 +++ arch/powerpc/crypto/p10_aes_gcm.S | 1519 ++++++++++ arch/powerpc/crypto/ppc-xlate.pl | 229 ++ 7 files changed, 6330 insertions(+) create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S create mode 100644 arch/powerpc/crypto/ppc-xlate.pl -- 2.31.1