From patchwork Thu Apr 30 02:03:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185859 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1499941ilf; Wed, 29 Apr 2020 19:10:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJqQ5mSEXBmPGhECvuk+q4mpC1b5L8YakW2yWkHZKCr/O2pJATWCdIM9DAvugYZXoC1e0ZY X-Received: by 2002:ac8:7681:: with SMTP id g1mr1330021qtr.311.1588212639559; Wed, 29 Apr 2020 19:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588212639; cv=none; d=google.com; s=arc-20160816; b=Z2eKXoy9W1EF4zMx9Ci0QxIUe1wdhuqayEZvY/rBY9uJeLWOpTyNw9ulvOvaYNmMVv EltQehUROUMLyrpD2DP5tuloCFxtZdl8NTOC5zUQ+CxqWLsD9bJ/A8sCdd/yD0pX12eP 6Uac9V03p7itJSMz+OCPIVE+hp1NASTZ/SMuADa4bqEHrbUwqG94SZXPuRFeai5nXnAq XSaIw4UQvglsZniyiy1e5CicuxJLXhLCyQkjT4GhOVrgkVg0pY2uTYztv+RzSoc5kQLB DPAgBYPgoKtfH/L+Fg3Kl3xg3sOQryMR39c3NEXKyn1w3p0isyGsUG7eekzv6cdvk/Yt PJvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=gPebZLEq22TKfPbe2B1hfEuFz1pSf7HcPvbgd2/oRv4=; b=C0hmcpKrzbwvIkWu/xIKD5muLTWCKGL2eWDdc4ljWkMi4CJ4VOFuWDkj9Vws6Sf2gL DNw+K/oLlf4y4r59ktMhRr8UyjGsecAfOTZH0jDIS2hRSE5nM6DvHSkSEKvglR+XOze/ +Hxb1CG5BA+yLjOl0hQjPfRip0BkvZagAYTQa4YhrVo95ZEv0pYqcfbgqwRaVN9SW/L6 XwaUy2rw2NXLFR/rV4JJI9H6VBsHHFLED4Gt3RicgDirABLM1k682SR+4QWfgMzmexFR hO/UUYir6SHVULE2zxeuwki2E0JmTgOajhQvI3jpPfOd8cTUAh1VJmH5cbdDdYfrcSQ4 rtXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PV0pLBEH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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. [2001:470:142::17]) by mx.google.com with ESMTPS id i19si587558qvu.43.2020.04.29.19.10.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Apr 2020 19:10:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PV0pLBEH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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]:35544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTyet-00069s-2c for patch@linaro.org; Wed, 29 Apr 2020 22:10:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTyYz-0006yV-6q for qemu-devel@nongnu.org; Wed, 29 Apr 2020 22:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTyXj-0004kL-KV for qemu-devel@nongnu.org; Wed, 29 Apr 2020 22:04:32 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:39901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTyXj-0004k7-7f for qemu-devel@nongnu.org; Wed, 29 Apr 2020 22:03:15 -0400 Received: by mail-pg1-x541.google.com with SMTP id d3so2002870pgj.6 for ; Wed, 29 Apr 2020 19:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gPebZLEq22TKfPbe2B1hfEuFz1pSf7HcPvbgd2/oRv4=; b=PV0pLBEHjRV/gNiDUYzWQtpWc6TVpTeRt2gEKaMpvbi7snT1KSMzF0lAozLGwtX+cN Xn+ygt0+LR/ZuD9RXb1VyxV4XE1CRZZXrqpIUzgTNGo4VGV0anixSV+opcitaZD/ZSSp eeMuu8aqHAbCxKfScLcpbfHRYvsrsnVit++v8XzGMX3S/g0ocyKs0DaJTjKC0M0KpCyt XRkdScWG1dR80MTet/1QUkpPZiRfAP3hqsC2jE0eB/Zaj6WEyRBS69i7Hwm0XfI6OKga zIIBlCH7Wl4cJSOV1vv11SKU8FSvpbD+KP/4g0CMnPg1mRy05BBMpwkH57IpYs854Nu+ Vg+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gPebZLEq22TKfPbe2B1hfEuFz1pSf7HcPvbgd2/oRv4=; b=hUrCYQ5NvoSL/Equr0dw/WV/RYsQaEYihBtMrgl2KT/IY0Etv3fxIYHZh1bsbDkZJi Gmj3w/HwUUpygF0gPb/KQbEBysmxb8UQRKJd9PLSwyX7z3bHWDcJ5sYmQiMhrk9EfIDD TDsVXZIS39Mj+/DNWTKD8rV+z8QBAsvUZ7A5obbomdBoZ9l9aQ4FlCVm7LQ3Z9uUOHDb QTnXB67IiBt5Ar8l5lPRHCfZ6dnK30qZeOFXBsTi25xmcN65H/V/8lMP9SibjUGxBqST vRnRNxBil0Ddi88Ut2U6eL3iq0n14RAc2YqZDHGcaDnV0Xi6N/v5QIgSzuF60vyvJ1vz rrDQ== X-Gm-Message-State: AGi0PuYHO4VUAoe1ym1e4MhBWLIOkm1jdrINQfE0rnV7/hN3FLckOj/N xawEv5SQMCfhJRiXqpMN1MKey1uGoOQ= X-Received: by 2002:a62:7c16:: with SMTP id x22mr1097817pfc.267.1588212193543; Wed, 29 Apr 2020 19:03:13 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id y3sm409284pjb.41.2020.04.29.19.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 19:03:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 7/9] target/arm: Implement SVE2 crypto unary operations Date: Wed, 29 Apr 2020 19:03:01 -0700 Message-Id: <20200430020303.20264-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430020303.20264-1-richard.henderson@linaro.org> References: <20200430020303.20264-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::541 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: steplong@quicinc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/sve.decode | 6 ++++++ target/arm/translate-sve.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) -- 2.20.1 diff --git a/target/arm/sve.decode b/target/arm/sve.decode index b73b64c3f2..04985d2bb8 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1551,3 +1551,9 @@ STNT1_zprz 1110010 .. 00 ..... 001 ... ..... ..... \ # SVE2 32-bit scatter non-temporal store (vector plus scalar) STNT1_zprz 1110010 .. 10 ..... 001 ... ..... ..... \ @rprr_scatter_store xs=0 esz=2 scale=0 + +### SVE2 Crypto Extensions + +# SVE2 crypto unary operations +# AESMC and AESIMC +AESMC 01000101 00 10000011100 decrypt:1 00000 rd:5 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 413000df3b..44dd1fe2b0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -8174,3 +8174,17 @@ static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) } return true; } + +static bool trans_AESMC(DisasContext *s, arg_AESMC *a) +{ + if (!dc_isar_feature(aa64_sve2_aes, s)) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + unsigned rd = vec_full_reg_offset(s, a->rd); + tcg_gen_gvec_2_ool(rd, rd, vsz, vsz, a->decrypt, + gen_helper_crypto_aesmc); + } + return true; +}