From patchwork Thu Aug 29 17:20:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13783487 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A14ADC87FCD for ; Thu, 29 Aug 2024 17:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WMxCfWRv6D0vl4Q9B1HD4zyeskglk5f3pm4+boTRGNc=; b=m6MgX45KvHqLXI60+fBwUDYl9o XEfoskzzJirN0RmK/6+ilbU/fS/9g87dD8YCNoO/ZvthQ3/RsZAHBdEsElO2PcMk6hviSmStOGr0t 5cK0qcSjvRWJQtsLLeXarC5CeTkjNnoHKmMgruE84SHYQBEWcUEgZLuQuAcuZiZYNGKxi//hogc2w hBoFBglC8RGJOACmhPehiZH+J92Zfar853dKh6MLnuxuOu5GLPd7KwXec6DOoaxSLldCoxjxxtnpo J3iXWsAmR862FUkCkZjkDm98RH1yj8sKJOr9CEaO6CuxiQMdKBbsTcZHSDaynn46rhBxXW2dheeLZ dfEfa7Ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjipi-00000002zLP-27xE; Thu, 29 Aug 2024 17:21:18 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjior-00000002zCd-3sgG for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 17:20:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E3847A416D6; Thu, 29 Aug 2024 17:20:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73AF0C4CEC5; Thu, 29 Aug 2024 17:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724952024; bh=6LJEGZf3n3ynEEQJ10UOAZ7qPZy+uexA/5YdMequJDE=; h=From:Date:Subject:To:Cc:From; b=DDJi784KoWoxL4fzh1R7CBaWskTrpcjj9tN9WJZk8ThMsdQ23yLyEMohc6ez1yq1g RPjZS8O5Ee0OR4qDAe6otPMgAQ8UInWleQk5UGFIyJQPIkuXqFmK5vPOqZNGsgu9/D qJ6QeCLzu2SNv5FC7pPgmdWbnlmrll1SinlqBh82ZMnFcDgI5s3bKpfcdzhYq2tvAn iOX1EQfdl7Ij2k+ZJ7gYV27UPAyCV8HVDw6UhHH0eprMmacFW/VNeiKeICPW9v1eHT PvxILET3jxwRPhwPVqlAF2w6F/WPyUX66eJ0DnMOSwy1GnIpNzRK4sgKSpP1OcvMyK GqqRBd/oHYVyQ== From: Mark Brown Date: Thu, 29 Aug 2024 18:20:09 +0100 Subject: [PATCH] kselftest/arm64: Actually test SME vector length changes via sigreturn MIME-Version: 1.0 Message-Id: <20240829-arm64-sme-signal-vl-change-test-v1-1-42d7534cb818@kernel.org> X-B4-Tracking: v=1; b=H4sIAMit0GYC/y2NwQqDMBAFf0X27EKaRtH+iniI9lUXNC3ZIAXx3 w3icWCY2UkRBUqvYqeITVS+IcOjLGicfZjA8s5M1lhnGtuyj2vtWFewyhT8wtvCt5mgiUcMcOZ ZNVXtKVd+ER/5X4euP44TfcAS1HEAAAA= To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Shuah Khan , Andre Przywara , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=2313; i=broonie@kernel.org; h=from:subject:message-id; bh=6LJEGZf3n3ynEEQJ10UOAZ7qPZy+uexA/5YdMequJDE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm0K3UHxGEQlKEnTusD4tPnv70+x1q61heR1tT1+V2 sNm6KjCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtCt1AAKCRAk1otyXVSH0CddB/ 4ozIaNIiTOSgiNhc3FeiWwmqMxVhHJC5k4LqFMCsAoc8TklWH+Y0Gr2ZWvVjAkz+nwc1BdXTzREvtM WYZM6Lu8pUHCc9qW+bfqRtPoi0KHRi6H6mjvwixAuFLRfhYgy1SQT7rSkntiXTCQHiTMNeLk5Smoms L9RsYEbErkaEVrkGEjFyZPL5wZt2Oren70LG5j0YY/5v5dBXBUWSuDWMjx3DfryvRUwSdctbBh4B/b zlzFo//7FAEOIZzaSjVlUgaMYTHtPnOuYL+pmrflViHE/l5Z/EUzCer6mOU5ppHHPLn41+kw3Q/QnE gt+aTtl/K2j1svEiCgN0EI1HDkzf7B X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_102026_134755_21359E0A X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The test case for SME vector length changes via sigreturn use a bit too much cut'n'paste and only actually changed the SVE vector length in the test itself. Andre's recent factoring out of the initialisation code caused this to be exposed and the test to start failing. Fix the test to actually cover the thing it's supposed to test. Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown Reviewed-by: Andre Przywara Tested-by: Andre Przywara --- .../arm64/signal/testcases/fake_sigreturn_sme_change_vl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- base-commit: b18bbfc14a38b5234e09c2adcf713e38063a7e6e change-id: 20240829-arm64-sme-signal-vl-change-test-cebe4035856a Best regards, diff --git a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c index cb8c051b5c8f..dfd6a2badf9f 100644 --- a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c +++ b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c @@ -35,30 +35,30 @@ static int fake_sigreturn_ssve_change_vl(struct tdescr *td, { size_t resv_sz, offset; struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); - struct sve_context *sve; + struct za_context *za; /* Get a signal context with a SME ZA frame in it */ if (!get_current_context(td, &sf.uc, sizeof(sf.uc))) return 1; resv_sz = GET_SF_RESV_SIZE(sf); - head = get_header(head, SVE_MAGIC, resv_sz, &offset); + head = get_header(head, ZA_MAGIC, resv_sz, &offset); if (!head) { - fprintf(stderr, "No SVE context\n"); + fprintf(stderr, "No ZA context\n"); return 1; } - if (head->size != sizeof(struct sve_context)) { + if (head->size != sizeof(struct za_context)) { fprintf(stderr, "Register data present, aborting\n"); return 1; } - sve = (struct sve_context *)head; + za = (struct za_context *)head; /* No changes are supported; init left us at minimum VL so go to max */ fprintf(stderr, "Attempting to change VL from %d to %d\n", - sve->vl, vls[0]); - sve->vl = vls[0]; + za->vl, vls[0]); + za->vl = vls[0]; fake_sigreturn(&sf, sizeof(sf), 0);