From nobody Tue Feb 10 11:14:45 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1688927893; cv=none; d=zohomail.com; s=zohoarc; b=GQkyZidS98SZ/J3EvkpuExmZsMgJM8s/V7cHOEBTdI/0bqqZqhrVJKYiQrZWVyXhBwvEGBI5eLVf2mIPfIc2mFv9AZxEfc1Kdu8bBNiPb/thBANSyO8CXo2P+znLqppW4KA9R6euEuNxuROn7q3z+xDLxHp10ZbHhW3rSttfDzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688927893; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ehiRk+/4K4ZdSH5tBEmArhhxk2Xw8P4NzuIBcv7dVgQ=; b=LSwfJORmG/UwL5p9xv8s6lEQHjLaq/Usva545/O4hlzbt9fB5Tz0r5NpUI8WzJe41wEmsnaCFp28v3Uf0gvX5cD1a3YjBRH+s4dT5LjymAyszENLlH51mFcR6pH+aNm7EN+J8zdVLipDYty8QAzYiFp6lH8CcIO+PC+zD6ERdp4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688927893200649.9424688752836; Sun, 9 Jul 2023 11:38:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIZEC-0004wI-Rr; Sun, 09 Jul 2023 14:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIZDy-0003Ze-F9 for qemu-devel@nongnu.org; Sun, 09 Jul 2023 14:33:35 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIZDx-0004Ge-0G for qemu-devel@nongnu.org; Sun, 09 Jul 2023 14:33:34 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fbea147034so37230395e9.0 for ; Sun, 09 Jul 2023 11:33:31 -0700 (PDT) Received: from stoup.. ([148.252.133.210]) by smtp.gmail.com with ESMTPSA id e17-20020a5d4e91000000b0031433760a92sm9635256wru.115.2023.07.09.11.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 11:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688927611; x=1691519611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ehiRk+/4K4ZdSH5tBEmArhhxk2Xw8P4NzuIBcv7dVgQ=; b=ts7b6gID2uM1UB8wm54G4iRs2Wgna6SgDMVYW/LMvOZzFo1eAWQ5nZRPDBolohZQQv 01vAYnIiWKteCL7xvKWw/mwK2SXwzhh3rrDXHBEj3O3yMC3yqYmh9So5m9TR2hmz/RlA kKbRu7dCiCCgJcqgwHlygvlGQGoaQ1sRppYC8GI14238uLEcBDH03gmHFVfqI3HA7jOB Vq9zcMJj9rASvfsFXM118QBPlghqvZyHKP0Iz7X+/j9TbEL9Umzi0iydErQQdu6nGuxw /3ERoCQPAcEkWYJ93jVES0aiPFwNXgpJQYkuLondspvwA5Gd06u4D9QxeKF/Qqa5/rb/ ML4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688927611; x=1691519611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ehiRk+/4K4ZdSH5tBEmArhhxk2Xw8P4NzuIBcv7dVgQ=; b=j1iTINeAL0pqJ1ytJpVZm3RfxMEfqRDRuJCjUnKP/SlognoR1nNEabMHXH2pb6yNi+ Wtly6+VZXsSVCW2BSnSWM6AtmJIKg+ECRBZ4nRFGl+pDw4oYEf+585ZY0YDTb+MiYyeT US5j9yd04rG1UsELnP6MQqk7uFgBUXtoLdA1c7fTjR6IqInLK1uO0q4pYQbh25gByguB G3ilxJVY4eU6X3jzH+gNkakkbh66GQwTWfsiH0hs+8ejcUBOzLa33fK7zDT3IoB6KOKL XQpgCyhiv3xmX+IcRfINt8mjRZrELsTOgB6Puyvc/ISMueb4J4fICd8fFEYqgPMGf2h+ fV+w== X-Gm-Message-State: ABy/qLZ3vqHxEK5ZFW4xeq3pNhtykWhptWL9RoKOjYp+K2Bwv3ph1MKt mAAdC8ukBu8qNkZf9DtMPO57KLWZ6jC9X+ts1LO4Pw== X-Google-Smtp-Source: APBJJlGmxWPXlYITkzWQ7lr7qsZx1Q9znY2lfOWADGxt+f/6fqLXbQON3a7A3mUrJOl0b2oGE4MB0Q== X-Received: by 2002:a05:600c:294c:b0:3fb:ffef:d058 with SMTP id n12-20020a05600c294c00b003fbffefd058mr5897516wmd.0.1688927611071; Sun, 09 Jul 2023 11:33:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 32/37] target/riscv: Use aesenc_SB_SR_MC_AK Date: Sun, 9 Jul 2023 19:29:16 +0100 Message-Id: <20230709182934.309468-65-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230709182934.309468-1-richard.henderson@linaro.org> References: <20230709182934.309468-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1688927893411100001 This implements the AES64ESM instruction. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c index 505166ce5a..c036fe8632 100644 --- a/target/riscv/crypto_helper.c +++ b/target/riscv/crypto_helper.c @@ -198,7 +198,12 @@ static inline target_ulong aes64_operation(target_ulon= g rs1, target_ulong rs2, =20 target_ulong HELPER(aes64esm)(target_ulong rs1, target_ulong rs2) { - return aes64_operation(rs1, rs2, true, true); + AESState t; + + t.d[HOST_BIG_ENDIAN] =3D rs1; + t.d[!HOST_BIG_ENDIAN] =3D rs2; + aesenc_SB_SR_MC_AK(&t, &t, &aes_zero, false); + return t.d[HOST_BIG_ENDIAN]; } =20 target_ulong HELPER(aes64es)(target_ulong rs1, target_ulong rs2) --=20 2.34.1