From patchwork Thu Sep 30 18:11:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514963 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp37599jaf; Thu, 30 Sep 2021 11:17:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/A0p3m0Pc40pxNycCCia3wN5cevtUk3RwPFkVDp4NRpm2J4ZusJ4PqxDmR27Cgc8XkJZ1 X-Received: by 2002:a17:906:8a6e:: with SMTP id hy14mr804605ejc.366.1633025847910; Thu, 30 Sep 2021 11:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633025847; cv=none; d=google.com; s=arc-20160816; b=mA0jT0LEgL8UBVhsm9tOilYS/mDdip4GXd1UvIlv7coXPDV9LY8MjPFxd9alrris8W IySQTp8gowcHYrrdwRW9qZDOnRY6NN4fJ13FXa5dEaTmiR1xckRlACFg1fLuSAm3Rf4+ ac2Kz2UTRrg8WIKr2LAEUnkuxs8QuU3x0xJSjZ0tNwxgJGu9xIPaXaFohqq0zI3f+xBS arEzHgsHesd5uTn3UOQOVABCAbmJ+TO6o3A8dXYsFraKd7iSZ5y9QzqGwWlCnP67x0Yx ckz+JPLh358g626GzKDG/A4tQDUjTG7TECq73mazur03R2F/Wi1DYJjex/ToUE96sNP+ OkzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MfB9c7esaMavQxdI4UpGpnrgK/1Vq1RT/H+92wMHUq4=; b=xpLXSqU/bQId3F19oymM6HWBkkIfYgx61saeit8ESB3kBIlCaCjTVz6j5Ckh2b0en9 UQEAobNJlJjYiCFROhYgOfNE4LtsI7O9Mq/DnglgWfZv/ssFwRsc2j7SkxCgqoVPVf9m tHYxTPBEARh5v2oWxQyXDIGBcwr9gl3OxBDDz6s00ecwRyF/2Y2ZUJdSLQArJQUCoaDE AGAvTQiJ8/KOeIdq0swQxMTB3JMSvdSFwQqltPoWGlVD+X11AK4Q8Y/JWcD3lTr9x6LC hG/enP/FbCF1XJMe+ggwekCdr+qnMc0ZQwnaQhyhXMLA5zCger706O/2KpL+AkiEO5s+ OCJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HKguPuNL; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si4335628edj.607.2021.09.30.11.17.27; Thu, 30 Sep 2021 11:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HKguPuNL; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353379AbhI3STI (ORCPT + 5 others); Thu, 30 Sep 2021 14:19:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:57610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353361AbhI3STH (ORCPT ); Thu, 30 Sep 2021 14:19:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B777561994; Thu, 30 Sep 2021 18:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633025844; bh=YiArib9lDZUhVlxhO4SS50LGFXBxzcgVNmlAQWvVk0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HKguPuNLzVRKmySrXqd8MRYfguHbVNiX+190SB1ycoLn79JzR3lyZ8i4IO7XqGNLX /zGIdssS8W4vYL5y8oU9n9SeBui2qmkjuxZ/X0sgYyarsAX+hHnYHvgxJV8b4XJPq7 3iL9wtX9dczPJ7EbKqPwiUtCARQe+RRLXaimCs64V59cwDNlF5IU9S7ZvJhJMF1Xb1 6njJwLsA1+6gp1it2Gh0nDD4eiG4YmBDZoweRlPpeuxZZoNAqfMIQSCXdK4fMJifRo ttd3SGoiBDRavSIkHQVQ4C/RGtfDUsVTdyxIZza7Cz8AJN6PT1OCu81xGAQTlty7Wy YIPSqSwLo8hnQ== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 37/38] selftests: arm64: Add streaming SVE to SVE ptrace tests Date: Thu, 30 Sep 2021 19:11:43 +0100 Message-Id: <20210930181144.10029-38-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210930181144.10029-1-broonie@kernel.org> References: <20210930181144.10029-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1273; h=from:subject; bh=YiArib9lDZUhVlxhO4SS50LGFXBxzcgVNmlAQWvVk0s=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVf3e3wF+XsypO8VqFraJMHCQiqB6TiEP4kPv0HtG Dvpm5UyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVX93gAKCRAk1otyXVSH0JsKB/ 9JPOm70H8alGKjZJ/R2CAQjzsMroapTt/I5Y3+9ah5vCyJabD0xvgvdrFuvblvdeDEBOvAA9Pg7QFo dKRPonlHz3mofoBysTc9kwUmnlUmAj/S2qfLm8ssZ6x7qD6bxdqc7iVGPuSveweq5XSYbF3swJ5pal kG5ndcEd1WbTkT878lFbIfyApBuIQThLRu/yaJDiBPg13cRWa1RFNvCFGzcXzfCkM3ROqfx1384mQ5 SlHy7uWT6vpk0ORSMV6tnkn9vKaAGlqOudLoeLzDwb7KqkTRgavdP5OQhhWOyPNgmehl64kykPbabT G5OgGTp17dR1ddmlaRakLmzqof4Rd+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org In order to allow ptrace of streaming mode SVE registers we have added a new regset for streaming mode which in isolation offers the same ABI as regular SVE with a different vector type. Add this to the array of regsets we handle, together with additional tests for the interoperation of the two regsets. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.20.1 diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c index e200f7ed9572..654ac0f8f73f 100644 --- a/tools/testing/selftests/arm64/fp/sve-ptrace.c +++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c @@ -28,6 +28,10 @@ #define NT_ARM_SVE 0x405 #endif +#ifndef NT_ARM_SSVE +#define NT_ARM_SSVE 0x40b +#endif + struct vec_type { const char *name; unsigned long hwcap_type; @@ -44,6 +48,13 @@ static const struct vec_type vec_types[] = { .regset = NT_ARM_SVE, .prctl_set = PR_SVE_SET_VL, }, + { + .name = "Streaming SVE", + .hwcap_type = AT_HWCAP2, + .hwcap = HWCAP2_SME, + .regset = NT_ARM_SSVE, + .prctl_set = PR_SME_SET_VL, + }, }; #define VL_TESTS (((SVE_VQ_MAX - SVE_VQ_MIN) + 1) * 3)