From patchwork Tue Jun 20 11:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694480 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp246909wrm; Tue, 20 Jun 2023 04:16:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62ky7n77MePaXW8JxQdxw0tl5Skpnc2LXoBy2LTy9XvGolie208NjWJIHw6RGKsDV+c+Ue X-Received: by 2002:a05:6214:21cc:b0:629:58a7:9aab with SMTP id d12-20020a05621421cc00b0062958a79aabmr17352161qvh.32.1687259759792; Tue, 20 Jun 2023 04:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687259759; cv=none; d=google.com; s=arc-20160816; b=YsTeXbfrTxVMyrz7UP6Qholpv9B7MjWygCCTUrvymKMd2RfbxlMtctlX0gfIakH4VU H+8Qfs2IMbBB2jxePN6PAaat1Ng8FHR4yLp7QCSDgnaDrWjDpEbYR+zvcaa3bvTRCG08 X84Rme5UMrdAKC6Vr3aWnASHPxbLfueh8C9CE1410mZQg/cTufyl8x67Y8fRvkoAej0m PPROOa0VD0Zk5+NKUlmQQHYBPUeW8f8GEUQICa8LDY7qX7gPyJ1PxP+zZdXrengjAaPa 9YmHe/jj4Csr6XWw01PNnV5QOqj8qqcFKe82G11kSxfXXfbLBor7/KFUdm6kjxv7JGSY 0TwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9eRhNGGsvyXPq3UhYSn/b3L2GTywYRMcqzsZGePD5qs=; b=siXzIniIB+Me8G3xaZ7EfSlIZu72hT3Uu91y5iLxXhWSOFc4P6tilaw1luDlc7LYXk kgZ/lGU/dnfaQATvncojdkl5bA/xj0fJic2O5HSfMhh8l0Rdn0GpPzDKubKdm1iwKfp1 Eh6GB5HRIB3SphzuSRS6BZWgGTMKzq6wJnSXQcCsOp23ZgvkGn8EB4IPgwlONMsZySb5 M4lrpZm1lmvO134lIiYsvRynj7UpC1/hVxOBav9+hd/j6x+FkrRKsklgWatbkfr/B4LV iWrx+vvvKhXTDu521ExiZSHYcKVtZufLHPAZXnLlXPyBXhvCrzUYuvtSGwqBTUZv214L OUUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qlRMKSDw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r15-20020a0562140c4f00b006239faaf931si711832qvj.441.2023.06.20.04.15.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 04:15:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qlRMKSDw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBZDn-0006Dd-R0; Tue, 20 Jun 2023 07:08:27 -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 1qBZDl-00069F-Br for qemu-devel@nongnu.org; Tue, 20 Jun 2023 07:08:25 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBZDi-0004KP-IT for qemu-devel@nongnu.org; Tue, 20 Jun 2023 07:08:25 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-987341238aeso542386466b.3 for ; Tue, 20 Jun 2023 04:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259301; x=1689851301; 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=9eRhNGGsvyXPq3UhYSn/b3L2GTywYRMcqzsZGePD5qs=; b=qlRMKSDw5jp18xRy31DWRLn5VTDlPGb2+rDlWqCbfGnGzbPgBpNsLxyKv7dA+LL6IY vVKOapqjTl61Ylvyn9ENKLqPxcIzQnjw3XIYkPskAG1IEq8f/nIDQPHYeh3BsL6j0nql IIRQTwWevJOg2b4jcs/YVBVy/6DXzaBm4ewMeZbBTaFmlig7FccnOiS5afiTxU4qzjXg MY23qUeiQaH8RHcyazg7Z5jlDwlMs32ikjSkEBceRtzAtuXPYaC70mQoWkpMnppVHrDC psHN2ZKKPyQ53P5TEWDsq/1G7JCYLP1VJad0SC70GHfxE98EtXK3d+r1CtnBEEEWrByQ zVOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259301; x=1689851301; 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=9eRhNGGsvyXPq3UhYSn/b3L2GTywYRMcqzsZGePD5qs=; b=duccV4rL/xwJ5oi2uZ8NDmmdSQiwtNjUH+hJdf7jbKvhUhufleQ1hUZMW3jJ0h6D3j EUwrrdZYYDf8n1hjr1sTj99sZ95vR2FiE97eW8dfwb0GN9YB+nua/S8EDG+YHI0PwHiX y+HmzQOgQtflQm/tCiezltNmnwavldQxGvtYkj0sso5BjStYskIfKTNaMYM3yLsmTEvA A8/1XuM5Ak4AgdymkaXQTEb8cQ/6NRZZp6XwhAmB3eYvY69CCA0WTnQ/YnCkg3H45QE4 dehg0BypYkPV6qas/lyV97ROc/GW3PxE8rECU1cX3tYgw3vtkslII9XaB3Lw/n0h4FQP goPA== X-Gm-Message-State: AC+VfDy98lFzlKu9KnTPvkEaqtiTyY1j/sT2b8aj0zzoI3vlbfZSv4ia bZmnwSiZh4e6otIBYVIDxTJcGnpKCIjDRlieLb4HTRQC X-Received: by 2002:a17:907:97cd:b0:989:5a7d:f43a with SMTP id js13-20020a17090797cd00b009895a7df43amr57930ejc.66.1687259301070; Tue, 20 Jun 2023 04:08:21 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id x17-20020a170906711100b009884f015a44sm1170687ejj.49.2023.06.20.04.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:08:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: berrange@redhat.com, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PATCH v3 14/37] target/ppc: Use aesdec_ISB_ISR_AK Date: Tue, 20 Jun 2023 13:07:35 +0200 Message-Id: <20230620110758.787479-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620110758.787479-1-richard.henderson@linaro.org> References: <20230620110758.787479-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-ej1-x636.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=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This implements the VNCIPHERLAST instruction. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 34257e9d76..15f07fca2b 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -2973,13 +2973,7 @@ void helper_vncipher(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) void helper_vncipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { - ppc_avr_t result; - int i; - - VECTOR_FOR_INORDER_I(i, u8) { - result.VsrB(i) = b->VsrB(i) ^ (AES_isbox[a->VsrB(AES_ishifts[i])]); - } - *r = result; + aesdec_ISB_ISR_AK((AESState *)r, (AESState *)a, (AESState *)b, true); } void helper_vshasigmaw(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six)