From patchwork Sat Jun 3 02:34:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 688785 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp1165182wru; Fri, 2 Jun 2023 19:39:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aJGR/DJh41Frq/SW2g6/n4JyHRPdsHPyQhVmQXCq5DkUsSoK9mrYPcsRDznWvnAPfCQeP X-Received: by 2002:ac8:7d12:0:b0:3f5:3cb1:4617 with SMTP id g18-20020ac87d12000000b003f53cb14617mr270809qtb.55.1685759985716; Fri, 02 Jun 2023 19:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685759985; cv=none; d=google.com; s=arc-20160816; b=x+LDG4OUJneYsLO0OcIxouQxaLRuyIdZBURt0oxbwWLz1CmN2AoVGxxoXfLQObSewS 5NUa8ISZUOmFNhKovv5LCDg8sge2Sgs7tMGLG5wI42FTNn94RoFKVLD4+kmim7L1ix1V WfXqnlUSQHmEjZg022QyYA6skWe67DdLoXOrmr/PfCp8IZSf5wnt5c+AX2HL91a3EuOI LRaWHvRiCYvabU7fxALAcODi8oo7KHXS1sapKEQpumSheektMriptra+DH5N91cLM4ba 3disv8XRL/RpsjcXKLiFbHbzKCE1tX92WBNZbE/q4GQiESPdDDE81pnVr2haXBHKCuyB Be0g== 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=u69UQkBy31b+t/zyg2gVlBb3lh+xndEyIjHtbKZIvTU=; b=s7kFWtz/3l82ZyuopeDLSkRcMEpMB4rn7Sb+Fnec5vI0Fo43l5CRFxq2fYg7A/kqk/ XNjRmIn8taWmwldxNj73kb8hX212LxYaWrXhmeSm71isYdMNmWhZKfIUj8KLX8FzNlOV z3QNrtFGloRlpEh802nmVL9Rkp/VgOPbv0QqDUGctnKIsBIf2RTe2VMuOr2s9Omt8xft O+sqA3lID1GKPuwKuL8MAgN3nLD7eG7I1d8wWn4MZ/AOPbrfhwQEElkQ2AU4f8u3ejfv i3DHIRPpi8RcqQAwCg4uJFVI8GFryrTH64MgChIvG2lbUWMklKNF3N8TOXauZ94qJ6AU uteg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pWvCC9uQ; 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 n10-20020ac85a0a000000b003b86c374071si1725888qta.787.2023.06.02.19.39.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Jun 2023 19:39:45 -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=pWvCC9uQ; 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 1q5H7S-0001XV-Aw; Fri, 02 Jun 2023 22:35:54 -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 1q5H6Q-0000T7-D4 for qemu-devel@nongnu.org; Fri, 02 Jun 2023 22:34:50 -0400 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5H6G-0004mC-Ug for qemu-devel@nongnu.org; Fri, 02 Jun 2023 22:34:49 -0400 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3942c6584f0so2046750b6e.3 for ; Fri, 02 Jun 2023 19:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685759679; x=1688351679; 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=u69UQkBy31b+t/zyg2gVlBb3lh+xndEyIjHtbKZIvTU=; b=pWvCC9uQQxp9QIFTEsfnyKcJ00EqthHlH/bPANtGH3qmEF+6+kVSTbiHumeWYbky7B h1btG8baW59HZuI7EznMBCFaPhx76Zjpe0WBBiUtvr7NRfQ0oTD55o3bdgeS7q9+z/lU WnqNqRkFfC+yoOBPmSANLLq4MjxiFA1F9oSCCz3X7pnjObtCZDsUJr4+7/SJQ2CviIqZ JCyMEGR9WoIo+xg7SDJlpp3iMQatpPjKd7PBgb1hdYgH0OKs2ZTmNTNiKikD5oJZwoxS dT5MJzvzameFTkJATJZVzr//h3V39a1ccvj/vyIKgvfSS7BDJONUMoLQFoCFWfpsKR4E LDMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685759679; x=1688351679; 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=u69UQkBy31b+t/zyg2gVlBb3lh+xndEyIjHtbKZIvTU=; b=AehZj1GSEPanEydTJkKgqR2oKpyWg8U8Km+PVXzhMVoMR/jGI0S79rmhFyhPU/lisn ey+wcPOveCbuxM7jg9f80lDKcTj1Kg8mrwYBrx4yiTfqq2BbsvcDZ9Q/qsmP9boHOnDS BGP/E5B7XjCh0wt6qmfHFgizvPtzKobMBXZJR6WmzQ5kcNL6bYCHPYrpDy4njR60OLPA oCP4S1jzuTYaUJ07hhRA296TWu955dK7qB+4hGvCTN+gpDfZaCCxnAcuButbuKEkkmo3 hBBokRazoDqKMLj+3nGm2MduV6HEfT693SSS1ElgPNwC097PKgD3zOqVoabhLFGqaNsS CBGw== X-Gm-Message-State: AC+VfDw0Pzy8EySUSDweAU/lQeWCUDu0aRsFf+ySm9+KK9qef9ilpC8v sl0kX09PGj8optt3N2np/A6E5J4oZPnRy5Ctp4Y= X-Received: by 2002:a05:6808:649:b0:396:63a:a715 with SMTP id z9-20020a056808064900b00396063aa715mr1698260oih.56.1685759679191; Fri, 02 Jun 2023 19:34:39 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:66a6:82c2:d794:68f6]) by smtp.gmail.com with ESMTPSA id e91-20020a17090a6fe400b002508d73f4e8sm3914289pjk.57.2023.06.02.19.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 19:34:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: ardb@kernel.org, berrange@redhat.com, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, pbonzini@redhat.com Subject: [PATCH 13/35] target/ppc: Use aesdec_ISB_ISR Date: Fri, 2 Jun 2023 19:34:04 -0700 Message-Id: <20230603023426.1064431-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230603023426.1064431-1-richard.henderson@linaro.org> References: <20230603023426.1064431-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x236.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. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index b49e17685b..444beb1779 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -2979,13 +2979,13 @@ 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; + AESState *ad = (AESState *)r; + AESState *st = (AESState *)a; + AESState *rk = (AESState *)b; + AESState t; - VECTOR_FOR_INORDER_I(i, u8) { - result.VsrB(i) = b->VsrB(i) ^ (AES_isbox[a->VsrB(AES_ishifts[i])]); - } - *r = result; + aesdec_ISB_ISR(&t, st, true); + ad->v = t.v ^ rk->v; } void helper_vshasigmaw(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six)