From patchwork Fri Jun 9 17:23:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lindsay X-Patchwork-Id: 13274236 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 195E6C7EE29 for ; Fri, 9 Jun 2023 17:25:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7fqa-000721-1Y; Fri, 09 Jun 2023 13:24:24 -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 1q7fqE-0006wa-9Y; Fri, 09 Jun 2023 13:24:02 -0400 Received: from mail-bn8nam12on20703.outbound.protection.outlook.com ([2a01:111:f400:fe5b::703] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7fq3-0004mw-Pf; Fri, 09 Jun 2023 13:24:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Us/bGEj4aOU3XOxwnbLO+zEUV4Sjvmj7d0ywXVX/TrkWy9qu0bb/jvVwDXgipwWNO402J+NMrGro5A1ETDnw/AYFGqLmDpWo5Wbh/oDLSXNT8tl1vuxqaJQyaHUSE4BtbzUwXJeTGmSL00Kymy0FXY4+LuoCiuEWQkZFmfe7jfmgIwrGYvGi1apQodZd22xFI6G09zE1g1uwtPA43S97OEq9i6XETZ13Un615tHkdGUUWJl134LVEAeeNnmtABEo5p8P22mEweZBpWNFC0RUGQB0mBinRe8Sl7v8PiJaJUl6bFHuY35s4DPgGLfvHus7qwBd2+00wzPGMJiqiclYhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G+OW2zKA2AJiAZpU+7yvSHWjyZiFrHYLH5WXm6/k6qI=; b=XSbqxvHmS8DAa3s9UfB9fU3dLCxWh4Pccj4o8p7xxUnnoVfeti2LNpetNO3RDA5U/ZIC/bl3mJu7KIo++qGxIIC1L2nlZ4WayD759T5CSv1tU/9si/AsmMIrGYE6IqJNwI1WdJtiHTnoo6eGffqL946Tv6pDi9CPVlB4FrQj5icXDNL7tqHHgfcS/UBMc8TlwLOUe6tlYETOBtTDbPP/mnXtq/0hFJ1oOHmRmNMBjLhKwbK0tPyVH2Ll3XxNUodCBvnqu84dPchqXKa1iWhGQbRdxKKHTZqm7S99tyK1JPnU5h8th0Rsg/ufbjHZZj1YCupkxMSMlAvOhjoqJW9irA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G+OW2zKA2AJiAZpU+7yvSHWjyZiFrHYLH5WXm6/k6qI=; b=OeTKMQOf3LDXAJaM1/IVj4W7b9B+ePATKDxjuSaOlxTGUhhWnb7/xJmPEC8Y4o+WUpuMkWRv5Oz+fdcOyUczKSEDt5zotudT9CPhvLkd4lGxhGl+4cyNy3tMXh6GuNi9rPgYncgJspYch0t2CFIzHci/4nMjqi+VjDpw3JZuoIY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from CH0PR01MB7124.prod.exchangelabs.com (2603:10b6:610:f3::20) by SJ2PR01MB8481.prod.exchangelabs.com (2603:10b6:a03:562::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.44; Fri, 9 Jun 2023 17:23:43 +0000 Received: from CH0PR01MB7124.prod.exchangelabs.com ([fe80::9a78:4703:c6a9:16ed]) by CH0PR01MB7124.prod.exchangelabs.com ([fe80::9a78:4703:c6a9:16ed%6]) with mapi id 15.20.6455.030; Fri, 9 Jun 2023 17:23:43 +0000 From: Aaron Lindsay To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, Richard Henderson , Vincent Dehors , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell Cc: Aaron Lindsay Subject: [PATCH v3 0/8] Implement Most ARMv8.3 Pointer Authentication Features Date: Fri, 9 Jun 2023 13:23:16 -0400 Message-Id: <20230609172324.982888-1-aaron@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 X-ClientProxiedBy: CH0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:610:b0::14) To CH0PR01MB7124.prod.exchangelabs.com (2603:10b6:610:f3::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR01MB7124:EE_|SJ2PR01MB8481:EE_ X-MS-Office365-Filtering-Correlation-Id: 097a5454-2607-4c0a-856b-08db690e4667 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uObGPq901TBmULYSS+cmVqUXMXSqy/MSe6j3qa8r7V2JXaPWDzMoWHS2brzBR2G3tFtAOXPJ4SFeHugq76+UYGYqrKqxke3aAlAo43w4Ug+PoZO9YOIvs1AgILrq2+/K4cZY9hTCAhy5zozynBVJgIu7AgqGQ3o6pzyvTggJbCeOHDMW9woo5GTKwsXwTCIbIQ/e1mleJncSalwoSqikEho7swB/FYH82tWYybdE1t6PpyupnUM/+FCgCfdN7PugsjvnmDTQVJinANwFdKrfvGJk7Yaxa8Njzo1I+QiSMz4rU5UeuDyRXrukZQCeX/jtWQZ3An6lmz4L7lFQc5N/QRLmKDcmOZaGMk9s95/MCKsKz2dkB0yJEENUqjUYKXRUy25wS6J049rNPGMNNenL32JhSNAmCpaCPWqsfhLzYBh182V82WjBaYJQEyfHQhXrmXHgqec58ntfcQ5Lg/ERPwTwOBp6XK7WUDaXNfO+8w+D35zT9czXlGYtS3M9mGqRaYzfFWyB5219iwkJSoN7eq+5Egq3yrnrGIkTLFJCQ1ElfJUfKvGiH/588RSjxw/JbM96inU2HMvEkY9gTpbTZxcL3qIWbaksMdN4/wD0E18= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR01MB7124.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(136003)(346002)(39850400004)(396003)(376002)(451199021)(2906002)(83380400001)(26005)(1076003)(6506007)(6512007)(478600001)(110136005)(966005)(107886003)(52116002)(6486002)(6666004)(8936002)(8676002)(41300700001)(5660300002)(2616005)(66946007)(66476007)(4326008)(66556008)(186003)(316002)(38100700002)(38350700002)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TaNhcwAgRGugEHxdyIXKS11DBdAK2iQP75+BNpYEFyOuLxUCw1Lh+iCRB5e1yo07iaGjeJKu4Ed7ymfVKawSgvJg4j60wAH1FZsexF79v2OM0TrzG5Fb6PMlO/NHY3N1mf2clZr9ODIpmR4u2rncrTgG9TFB5ReeOlzbarX9OVBsAw6QtywbYyfp/fEd/I8ie9o37fmQc3rsfuyj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+rFvD0Szc050ThsQGpcDZAhUl+BA8+WfYPZFzKSb+1yl0jyAWM403moRjcggHJkqKlzvVEZQ+A5DjD+1wL541ToY/xkom/UgCMBYNDx8b2XptKD9PoJje0oUJrenP3TXoGPwrGl3JntKZMI/D9aqgbrUHy8qeuV1w8xzbo2t8rPeZ21jM9e5ZqFHMdqJ2029GiIsr0q6fgE3UUcTDKczPOpIlXW97YGScgBg3CoB4+XD/lKqkO+WntHf9VSYcNAbABjAIHKczHzqJrZGSjJ55YcvjBgL1DVHKw+HH6qDeKoDv4+IUF40h6vfp+Jv/T8Q0S9qfI1qBgDu3MkdXj7fCYJffU5y0TQtlLC8FoeLcDWB1bK1gs2E= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 097a5454-2607-4c0a-856b-08db690e4667 X-MS-Exchange-CrossTenant-AuthSource: CH0PR01MB7124.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2023 17:23:43.6287 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V7spHPRbaxJVPEN2t3wL8sIIq8dbeepKGAx5QNXve+XxAzDQW6nyIqmwIFemkcPrQIbWIoSdne/hyBRIZBGDKgdYB0TU7bZxZePVHM7Uf5cwsKVLpewjOkPj4E4ymVbP X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR01MB8481 Received-SPF: pass client-ip=2a01:111:f400:fe5b::703; envelope-from=aaron@os.amperecomputing.com; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Changes from v2 of this patchset [0]: - Remove properties for EPAC, Pauth2, FPAC, FPACCombined - Separate out aa64isar2 addition into its own patch - Comment clarifications - Several code formatting/simplifications - Rebase on top of latest upstream changes (for example, those which reorganized decoding PAC branch instructions) [0] - https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg06494.html Aaron Lindsay (8): target/arm: Add ID_AA64ISAR2_EL1 target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection target/arm: Implement v8.3 QARMA3 PAC cipher target/arm: Implement v8.3 EnhancedPAC target/arm: Implement v8.3 Pauth2 targer/arm: Inform helpers whether a PAC instruction is 'combined' target/arm: Implement v8.3 FPAC and FPACCOMBINE target/arm: Add CPU property for QARMA3, enable FPACCombined by default target/arm/cpu.h | 67 +++++++++++- target/arm/cpu64.c | 48 ++++++--- target/arm/helper.c | 4 +- target/arm/hvf/hvf.c | 1 + target/arm/kvm64.c | 2 + target/arm/syndrome.h | 7 ++ target/arm/tcg/helper-a64.h | 4 + target/arm/tcg/pauth_helper.c | 189 ++++++++++++++++++++++++++------- target/arm/tcg/translate-a64.c | 12 +-- 9 files changed, 270 insertions(+), 64 deletions(-)