Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2718019rdb; Fri, 22 Sep 2023 06:45:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxLkJto6UhX2W1Mb0VpNQ1BCsrUkELwaVesK5VvJ1hQFZarLjDdY2IeFngbmewGio1lVLQ X-Received: by 2002:a05:6e02:1d83:b0:349:3020:d103 with SMTP id h3-20020a056e021d8300b003493020d103mr10750653ila.25.1695390315424; Fri, 22 Sep 2023 06:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695390315; cv=none; d=google.com; s=arc-20160816; b=r9cFAKR9Mvn+zJBrJxPgxLEWMcn7YdpnmV2KHRPBFWTiQw7KFN9abqVuKtxqL01LNy ruNp9WXP7Dtmo2q7bmS7/es3tfZM0t3LOBjhYrbI76r4/st5HSeOxxj4hDOxd+cVo+82 qkjymq82GdVpY9p9V7LUMcezWB8ffZ1GjOiYOQeD76PcSkTPAH6VSy32skeyslkKnHvN Z+KtMDPy0o0BymIPdSSc9nhFn3yRxvY3x2bz3oXfgC4d4oZZHIROcnKfDfXFih03jJdC AXcyIL/k+wz4D6hoPuertlaDGFl1YOr9ehPmz2t5NPXCv0DBSQpWyMoO7gamun0Aecbn KhZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=826B83Uq2j7jsKSymVFjHRwtOgj4j6kZB/WaSM+C9i8=; fh=NV4WoD5lmKZeVMGiCvPuc5fRgKl9gJAeLk9L4BmvLGQ=; b=p2BfW3xgCSTWItIyHlENjOlAuXWLDAnjEjQohEhjBn5MTgVEWDR3zsta+JPe7YL5Rq HjzVfkNG/MWgH6Jiy3GRvbAyYnUEagZn+jITbUhkr6lvAuapIIjFA/4aFiCYTKCTRvF4 +iopvwsuPzX1ZJvxFNry2CM+HT0oszeMWkUARGB2JI3UIROrngNPY+gYmqjLmapCYNT5 fTdXtNnqGvvWSkfMaPl8UaJBg+BCZzPLW1AM666AZTDwLCjq/fQVzu8AeodJICMlquM1 i9eIPpbmAQqNK75Wwgbixl9Br0Wo8d06xETZ4mkwPsGwEJkGwGC9BZ/djB2YBKSXA/Yi EHHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t4lJmsa9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f20-20020a637554000000b00565dd3fbfdfsi3716756pgn.214.2023.09.22.06.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:45:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t4lJmsa9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5EBB7839A578; Fri, 22 Sep 2023 06:43:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234149AbjIVNnX (ORCPT + 99 others); Fri, 22 Sep 2023 09:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234097AbjIVNnW (ORCPT ); Fri, 22 Sep 2023 09:43:22 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF12CE; Fri, 22 Sep 2023 06:43:12 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9E2C433C8; Fri, 22 Sep 2023 13:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695390192; bh=j5vHMaZNulwNl93JoC0zZV0oxBkj6KYr0yGyd8QJbdo=; h=From:Date:Subject:To:Cc:From; b=t4lJmsa9K4SYFVWm0+sQnhrluecCWx1/h2UO3tdYzyQcNFoCfXBzw4bfLsSDLM5Kx D1FrCraIUpto64iBPGytXJiDuL8rmZ+8YiRCw+0Z0QZD3iEW8Gu1jhbjYKWG5zpphB DEdXCPR2i2uNEZD436cJqqKEX8fORj60xmlaiav6NBjHg5Yz24XBhRx1z3kg3//l+E wSaLRnXqdtQu8WjhwjdvzYTqxcocXGrqP0fT9CiU6pBwrU94hV6BRz0QtUn84QYcZA TswjEsDPPdvC6DlOA5shAnsgAK/X2vxv9NrPZcvq5I8DMYIiO1BS1K8tPEzFhhTouo ExFYVtjSAgA9A== From: Mark Brown Date: Fri, 22 Sep 2023 14:42:55 +0100 Subject: [PATCH] kselftest/arm64: Validate SVCR in streaming SVE stress test MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230922-arm64-ssve-validate-svcr-v1-1-f518960eaeda@kernel.org> X-B4-Tracking: v=1; b=H4sIAN6ZDWUC/x3MSwqAMAwA0atI1gZstaJeRVyUGjXgj0SKIN7d4 vItZh5QEiaFLntAKLLysSeYPIOw+H0m5DEZbGHLorUGvWx1haqRMPqVR38RagyCpakbZ52rptB Ayk+hie9/3Q/v+wEf+CEVagAAAA== To: Catalin Marinas , Will Deacon , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-0438c X-Developer-Signature: v=1; a=openpgp-sha256; l=1353; i=broonie@kernel.org; h=from:subject:message-id; bh=j5vHMaZNulwNl93JoC0zZV0oxBkj6KYr0yGyd8QJbdo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlDZns61ov5A5gcZVF0zAW559z+8Z0qx8tajKUMDpd tkqOphqJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZQ2Z7AAKCRAk1otyXVSH0KOeB/ 9r2n2qtsZF3r9yWVP4nOm48WJ3hFIrTcWeN+ScxVXkjqsE9cdscqgh645B5PY54xzcJF6Q2NcPBtoZ N0VTsagWZXTcbXrX5Phoy1xXlaUq6/KTSLL/PstOYP2i86Jkhxv3Rw8+Ajtuc55mogX0Vv5uXMGDxJ /hVZsOgBKAtFMQgHo3D7aoR2HwjvmlYSDvYT4dudhvfMAVpz0hOyfHvnfeOAS+1l8LFQOCjNtyLKs5 o2FtzXBmcjaN6pQk1z9aeWniPT/tzo3WjgeJV8V2HKQBjhS9qw/hmToLC0rc96rBLWFl88NU6SqKrx MH480RiImZ1PgC6BQbT9vEhnfF6rmT X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:43:22 -0700 (PDT) In the ZA and ZT test programs we explicitly validate that PSTATE.ZA is as expected on each loop but we do not do the equivalent for our streaming SVE test, add a check that we are still in streaming mode on every loop in case that goes wrong. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-test.S | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index 4328895dfc87..547d077e3517 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -473,6 +473,13 @@ function _start // mov x8, #__NR_sched_yield // Encourage preemption // svc #0 +#ifdef SSVE + mrs x0, S3_3_C4_C2_2 // SVCR should have ZA=0,SM=1 + and x1, x0, #3 + cmp x1, #1 + b.ne svcr_barf +#endif + mov x21, #0 0: mov x0, x21 bl check_zreg @@ -553,3 +560,15 @@ function vl_barf mov x1, #1 svc #0 endfunction + +function svcr_barf + mov x10, x0 + + puts "Bad SVCR: " + mov x0, x10 + bl putdecn + + mov x8, #__NR_exit + mov x1, #1 + svc #0 +endfunction --- base-commit: ce9ecca0238b140b88f43859b211c9fdfd8e5b70 change-id: 20230921-arm64-ssve-validate-svcr-316852554fc8 Best regards, -- Mark Brown