From patchwork Tue Aug 29 23:23:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 718255 Delivered-To: patch@linaro.org Received: by 2002:adf:d20a:0:b0:31d:da82:a3b4 with SMTP id j10csp243270wrh; Tue, 29 Aug 2023 16:24:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEn/kLtGYet2KipgiUrhZBX1ke8ibPD4bQMakz2ZXRiuGVTM3BYBLIY3iQyrIEgPStrDp7S X-Received: by 2002:a0c:f38a:0:b0:63f:7c62:63dd with SMTP id i10-20020a0cf38a000000b0063f7c6263ddmr482045qvk.46.1693351491868; Tue, 29 Aug 2023 16:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693351491; cv=none; d=google.com; s=arc-20160816; b=s+6fiMf61GSja2UYdx7N1eh7UlQk/wfUue5NLW2kZf9vW+rOzzdNGcKi/bLTbqBGN2 m1YZ1KclmdY+QcdUPozJ+fviT+OWfshrVJlzi79sIaWDQt9dNt15YR3AQLGmEP8zv+7Z PCCQIcd2jSF6oXN75brfn45Nc8slUBeoY2rWr3RGTvKZsNDqoHCbOkIixCB+ScX06CPg C1WGEBqXWtWoaVnUOgpgNCvE6STElswjyPufG2o0GhmWT7/Vq9NwnsTQFjSxKoVrykVG GYrChcjx0+sz5ZtrxuMnaHHv1wQeLp2GNHwPtpLyOPPjkMIHUUnHR/0AM8ELSnQ8k30o D7ww== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=Y4dMU2MqKObUooD8HDCDWw/oHlyWw4B/N3RU9lW80i4=; fh=EfLVKF30PRMlBBLnPfTKrxZS/PAO9ADHBdRXKXa4nd0=; b=HJ4ivM0FHdqJ76ImAmMp4Ha5ari9es8NxOnlyzQD733/AEvGw1uZl2QliO+SJi2dMa eyDBTpdJFD24eXKMLit/iDPSaWjo71xUOyTi3/pLxCD/56r6h5bQGLmTnU6etELdGKSV 23JcJZcyOa9iefcDFQag8zek9AU9Tuz8o8W0Oi/OxpN2QY15n7mApTwmNKnMcLxKpmxc CaZFAopZuj1o96731EGXyksa5i54D31hmw4S0wxmVzpsBvP8dNWooVo/o0/w1ksp7XJr Vnx8dTpHdEwLUlVsHH9I5HKicAd/lU9ayrjLxUE65J6SHY3e0lKSqAc4pcWIJGWtSZTy pZBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=win5P34J; 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 b2-20020a05620a126200b0076ef3e699b9si6635384qkl.43.2023.08.29.16.24.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Aug 2023 16:24:51 -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=win5P34J; 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 1qb83j-0002rO-FV; Tue, 29 Aug 2023 19:23:43 -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 1qb83h-0002Xz-SD for qemu-devel@nongnu.org; Tue, 29 Aug 2023 19:23:41 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qb83f-0001Lh-4L for qemu-devel@nongnu.org; Tue, 29 Aug 2023 19:23:41 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1c0c6d4d650so39268345ad.0 for ; Tue, 29 Aug 2023 16:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693351417; x=1693956217; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Y4dMU2MqKObUooD8HDCDWw/oHlyWw4B/N3RU9lW80i4=; b=win5P34Jqvz28SdQazFc1ShNtCVztv1M/kxWfqKNAQKapaFn6724xPfLsocVqDBL1p UsatMJzMwe9IgHVzjaNl5FmrL/Z+0DPQl3k3CjXBhUgFsNUixMAd3DQ3TyXGAMiu4psA zXfHq/nQlleawCfAWd5+w4VlnXrrnmZo4egGwybRyGbt1g0MLaPQzSWSBSrX1J4ibS8R 4TZDmG8mQYFVJas5yYzFXD0OK9mNV+pr3UY6HSjWgbT/VzrnYGEyu1dVBawCsuS9cUxr ykkI1siBoomtv19p95qCtaYR2TTavdjNkZXEv4GAPQ8PSH8HvCMyIkmv3jHJ7Krwoinc MqxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693351417; x=1693956217; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y4dMU2MqKObUooD8HDCDWw/oHlyWw4B/N3RU9lW80i4=; b=dZlRPWFuv9rMi0KQq0HfbQP0tTqwy3YH119EhncfB6z8ozHp8CF5LxqiuhCy4POd3T 7hIenS1QTXGPjAvccXbUVoXIV9X/+t5NcAo1ApE5c2jkoc5eB5JyT7TcWPUKVOLcxgZh vV75cl7MHa4s91TiED9/bAH7Lgj//iDbRNSk9B7an5LWVbY5Gnly/Iv36H08EUAh4BkP SbpHAIIgpAx+JuFGsMqPicOYz9T014tpTtNbYQzdJ88aUx9L/u3cDLW0TXGFlPcrsi7P 5Dx5lPQ3vsX/eH1ecciyQOG7j8hAbu2ingDto2qJw+qXnUKlP6iRn6GFwZhGywo/unE3 FwEw== X-Gm-Message-State: AOJu0YwADJ1zZnJZ1WRWfy9VCPY8Lw6Mntkqz9l8ngPt9jCgYa10t+vh AlAJsO6rE42HsZ6NEYQI+iPunXInEjkW4hlAHXM= X-Received: by 2002:a17:902:efc1:b0:1bc:2abb:4e98 with SMTP id ja1-20020a170902efc100b001bc2abb4e98mr472913plb.21.1693351417117; Tue, 29 Aug 2023 16:23:37 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id t9-20020a170902e84900b001b9dadf8bd2sm9829970plg.190.2023.08.29.16.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 16:23:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: aaron@os.amperecomputing.com, qemu-arm@nongnu.org Subject: [PATCH v5 00/12] Implement Most ARMv8.3 Pointer Authentication Features Date: Tue, 29 Aug 2023 16:23:23 -0700 Message-Id: <20230829232335.965414-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Changes for v5: * Updates for review. * Include linux-user ESR changes. Patch 10 is the only one without review. r~ Aaron Lindsay (6): target/arm: Add ID_AA64ISAR2_EL1 target/arm: Add feature detection for FEAT_Pauth2 and extensions target/arm: Implement FEAT_EPAC target/arm: Implement FEAT_Pauth2 targer/arm: Inform helpers whether a PAC instruction is 'combined' target/arm: Implement FEAT_FPAC and FEAT_FPACCOMBINE Richard Henderson (6): tests/tcg/aarch64: Adjust pauth tests for FEAT_FPAC target/arm: Don't change pauth features when changing algorithm target/arm: Implement FEAT_PACQARMA3 linux-user/aarch64: Add ESR signal frame for SIGSEGV, SIGBUS linux-user/aarch64: Fix normal SIGILL si_code linux-user/aarch64: Add ESR signal frame for PACFAIL docs/system/arm/cpu-features.rst | 21 ++-- docs/system/arm/emulation.rst | 7 ++ target/arm/cpu.h | 49 ++++++-- target/arm/syndrome.h | 7 ++ target/arm/tcg/helper-a64.h | 4 + tests/tcg/aarch64/pauth.h | 23 ++++ linux-user/aarch64/cpu_loop.c | 7 +- linux-user/aarch64/signal.c | 58 +++++++++- target/arm/arm-qmp-cmds.c | 2 +- target/arm/cpu64.c | 86 ++++++++++---- target/arm/helper.c | 4 +- target/arm/hvf/hvf.c | 1 + target/arm/kvm64.c | 2 + target/arm/tcg/cpu64.c | 2 + target/arm/tcg/pauth_helper.c | 180 ++++++++++++++++++++++++------ target/arm/tcg/tlb_helper.c | 8 +- target/arm/tcg/translate-a64.c | 12 +- tests/qtest/arm-cpu-features.c | 12 +- tests/tcg/aarch64/pauth-2.c | 77 +++++++++++-- tests/tcg/aarch64/pauth-4.c | 18 ++- tests/tcg/aarch64/pauth-5.c | 10 ++ tests/tcg/aarch64/Makefile.target | 6 +- 22 files changed, 497 insertions(+), 99 deletions(-) create mode 100644 tests/tcg/aarch64/pauth.h