From patchwork Fri Jan 19 18:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 125210 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp415156ljf; Fri, 19 Jan 2018 10:27:04 -0800 (PST) X-Google-Smtp-Source: ACJfBospjnncpOtWPHxlgu5nCNYADSSPjcSwvYTrOTT6aTaQWicGIbOikTjCTC/MeOwFMOQpIzRf X-Received: by 10.129.78.198 with SMTP id c189mr10458238ywb.83.1516386424347; Fri, 19 Jan 2018 10:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516386424; cv=none; d=google.com; s=arc-20160816; b=yYsaNQNK9/Y41cufA5VjQhGhMc8F9ZVXyyNxzS0d1BDxnQu1wfRZDeTDnMkk1zM4c1 VAExFOGjfiwGzt77wWDNfk3/uHsfyk7wp1xhDbte/Pr45n63xl1DH3PIC3M3ZJDqChUQ XfG3CEmYsR4SyaavMftmTBpKg6pqvvFw9zX6oAlqZzoqGjdGlSpyvWq287umC1JGNOnK RfaDTdScoiSkCuJlcmWz6LgEisjkJ3EHB4YON+dt0eDWTYlMsRePeBy6QrIEHl5Hz4MS UJ5/b5GKuOZwc8sdtRwLKlhblAKMCkobDbHHzBFCFpuRAAXG46lSKxRSwbb2an0u1HZO k17A== 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:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=vUMA8YZisqCPiz6IjFBL6dM5ane6iQDxYKNrnCUnVb4=; b=qRa/hxd42R0JEwaG6obPset4iuBq0iQ6QFKZHAr86sp2J2t0DYH2MOMz5RUJoE99vV ouxxw0oqrzx0ErUmGy2dnM5Koh69iZEVb0QaU3fOEfkFhb1CSzXld5qg4uznl9iY5exR P0oTXmNXp15rveIiWw1K7PKx93mWvOchoa/lr/SfuiN4HfHr4r1AEWNUuCxig35PW3cG 784vvtldPzMDx44NRSm75TpObWothT1ilGquxYWRaLBH66Q1wwVoNzW+xLRfpoUDt1gZ M5dxEAo7Dsnn4Ioj+7N+eQdzDXINEOdJqCowQbLs9Ao9H1g/NLiG2RUtp+uEEM9VrNK3 7yZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IV/y5Tpr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 84si652603ywd.494.2018.01.19.10.27.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Jan 2018 10:27:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IV/y5Tpr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecbNX-0001zs-MI for patch@linaro.org; Fri, 19 Jan 2018 13:27:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecbJj-0007bg-1m for qemu-devel@nongnu.org; Fri, 19 Jan 2018 13:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecbJf-0008Dl-6D for qemu-devel@nongnu.org; Fri, 19 Jan 2018 13:23:07 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:36025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecbJe-0008DL-Uv for qemu-devel@nongnu.org; Fri, 19 Jan 2018 13:23:03 -0500 Received: by mail-wm0-x241.google.com with SMTP id f3so5345517wmc.1 for ; Fri, 19 Jan 2018 10:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=vUMA8YZisqCPiz6IjFBL6dM5ane6iQDxYKNrnCUnVb4=; b=IV/y5Tpr4Xr+bDi5m0f/sjNJQFamSHoFBHkJbdTBdtQqApGaEY5fKnorNjfZwvANJt r6bwTmrogTjQIixStTQclOFULEBpOi5+tpfXgW41MmU14Gk5Mm36MfXhBlZrJ40hMGr8 prnZEU96YcULKIfJOG0fW3ivJMZAiKMv7Xc9M= 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; bh=vUMA8YZisqCPiz6IjFBL6dM5ane6iQDxYKNrnCUnVb4=; b=gfdzma+Adr8iO7a7GyBDbDJ6imDFtSDGOv4XNwMH8BpEEGV5FTPiyUMY+ozEH5yNsG Fjs53ICVfHwCjXMdLrmU3T0CmePKg+MFrWzdT38YPzGIOijT31PPNDtSkLkbM3v1IbnX ml6URmOdDPGrtyClg74l9QjQI+RgQqffwn2tP2E+m5xUjk7PoQ7CvaElKdC6LqQhHLqu cYJLXbz3JQCpkq78c4iBtkIbpIl5VJCy+3hPbwR7ldoBX0WiaHLoPXbpNwbTDAPPeJ/I /b2+T6hE49Jk5Gl2hu4qFDvt8K7GQLaORTXlek+mURtjrsiO5w5DG6UE/jfb0H78RPO8 H5AA== X-Gm-Message-State: AKwxytedti2xgLHNz+fC6/oLFYf13ZhEpgLIzSyTkuItepDMK7xFqa0p hyuYW9/b3mbY7C2FwKwa7Lz65z9yfIA= X-Received: by 10.28.63.15 with SMTP id m15mr8260707wma.1.1516386181560; Fri, 19 Jan 2018 10:23:01 -0800 (PST) Received: from localhost.localdomain ([160.170.62.40]) by smtp.gmail.com with ESMTPSA id f48sm6263629wra.72.2018.01.19.10.22.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jan 2018 10:23:00 -0800 (PST) From: Ard Biesheuvel To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 18:22:44 +0000 Message-Id: <20180119182248.10821-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v4 0/4] target-arm: add SHA-3, SM3 and SHA512 instruction support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Ard Biesheuvel , rth@twiddle.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes since v3: - don't bother with helpers for the SHA3 instructions: they are simple enough to be emitted as TCG ops directly - rebase onto Richard's pending SVE work Changes since v2: - fix thinko in big-endian aware handling of 64-bit quantities: this is not needed given that the NEON registers are represented as arrays of uint64_t so they always appear in the correct order. - add support for SM3 instructions (Chinese SHA derivative) Changes since v1: - update SHA512 patch to adhere more closely to the existing style, and to the way the instruction encodings are classified in the ARM ARM (#1) - add patch implementing the new SHA3 instructions EOR3/RAX1/XAR/BCAX (#2) - enable support for these instructions in user mode emulation (#3) Ard Biesheuvel (4): target/arm: implement SHA-512 instructions target/arm: implement SHA-3 instructions target/arm: implement SM3 instructions target/arm: enable user-mode SHA-3, SM3 and SHA-512 instruction support linux-user/elfload.c | 18 ++ target/arm/cpu.h | 3 + target/arm/cpu64.c | 3 + target/arm/crypto_helper.c | 192 +++++++++++- target/arm/helper.h | 10 + target/arm/translate-a64.c | 317 ++++++++++++++++++++ 6 files changed, 542 insertions(+), 1 deletion(-) -- 2.11.0