From patchwork Tue Dec 5 14:24:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13480258 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 09F01C4167B for ; Tue, 5 Dec 2023 14:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: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=1xTJxGlsSasvW1NuCSmtB0aUoflNL2+7Gm6nl82s8bU=; b=YIlwxM9/HYjdNJ Lardi9W04aUequ4CHYFGkR+TCaj6SlxHj3w2wS+1o1R1O9CZcIzszfnzra6mkiaI62DlI2XbEJuag tyDZetd4hrJxDqn3J4hw9iCzAWl+W9NHHFMtQI6um3YTKe4yMAOEHecZsJ3J1PsrZpRXdmv+lrLR9 G8opdomCxJyEWF2Ej8EjbJq5EROkYoq9R7NVu4viQm5sko4aGWcmK4tNLjFO6whyoEad9sgYcYZQb EQJSIYt5gyENNssEd/drsv66BTdSNa+q+xljhFHta6N4ktmHEDTM1OfBeclP4ZgmWEuprW13dVURB D34S7TXPunWulfSvytww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAWM2-007azU-2X; Tue, 05 Dec 2023 14:24:54 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAWM0-007ayd-0x for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2023 14:24:53 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 883F261793; Tue, 5 Dec 2023 14:24:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3623C433C8; Tue, 5 Dec 2023 14:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701786291; bh=jSFY6ngQogrJiHDWxQDhDnPQplkFw+RxN+tqq7rkIuo=; h=From:Date:Subject:To:Cc:From; b=ObTgFDce5CvhMAMYEA6xBNyyNpWqZoRQQHEafkBJcRAImxgmUw6JapCLHVe0/KPIA ivH3Rr68X6GB0oRlwU0FVxjxLugOzNweBspkXo6VagoGzOGKK8YHtrOx53pxXI1dMI RAwh9wFtW6VuYwyMUAA+qgxUxdk9DUcVVAkVvUlPFUPH17ABOaHqEdahnVgu55CZnP pJwha/E2rKEiEZH8+Xy0dKYfBl3Y9BGG7bI3wHRSHCd2+6zpnxOCXCPioWVbWF5fjn UsdeVC4qz0hCDAUQz5TkLJpWeJKzf2g/A1N61ztFnulc5sFXDkgGH5MFejFFRlsohL tlV2zqXFkuFlw== From: Mark Brown Date: Tue, 05 Dec 2023 14:24:44 +0000 Subject: [PATCH] kselftest/arm64: Log SVCR when the SME tests barf MIME-Version: 1.0 Message-Id: <20231205-arm64-kselftest-log-svcr-v1-1-b77abd9ee7f3@kernel.org> X-B4-Tracking: v=1; b=H4sIAKwyb2UC/x3MOQqAQAxA0atIagMzcQOvIhaDRg2uJCKCeHcHy 1f8/4CxChvUyQPKl5jsW4RPE+imsI2M0kcDOco8uRyDrmWOs/EynGwnLvuIdnWKWUWBvCvIBYa YH8qD3P+6ad/3A78DbpBqAAAA 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-5c066 X-Developer-Signature: v=1; a=openpgp-sha256; l=2579; i=broonie@kernel.org; h=from:subject:message-id; bh=jSFY6ngQogrJiHDWxQDhDnPQplkFw+RxN+tqq7rkIuo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlbzKw2Ip54YYzvTRn+xfMczlGiTTrq6VEnNtVDHUC 1ipV8PiJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZW8ysAAKCRAk1otyXVSH0L+nB/ 9AEoTq/6l+kDAJJrqW6eA7/Z8Sk3UANVz/z15sCRGFBi646UnGEG9TDE/Q+I4lp6/BUz7uN0+RKSSc XbRlqSzis7IAU6V4xOLsebhtJqF2WSPS4S0l0CMba53T6ZKJfVs01wWXOwf+wGEw4aHmUSnt38mua+ 16fUYtPXp2+JGX+x7YQnEK8pX9L/fYCUbPAC7s6//uFTM1X2l2JlAVopI90qJPcIVwdb56CvaR3y+u ycE3GzoZIuCHAhTaH595OjEQ/HyxssSBSmPScw7HNSIDhXmJ8xvYOd9Yn0LDvFfUFxD8mqv7b9cl4I KXz6xl70OqxV2H58KCtNqSirp6O+iY 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-20231205_062452_417071_7E6EC033 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. 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 On failure we log the actual and expected value of the register we detect a mismatch in. For SME one obvious potential source of corruption would be if we had corrupted SVCR since changes in streaming mode will reset the register values, log the value to aid in understanding issues. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-test.S | 10 ++++++++++ tools/testing/selftests/arm64/fp/za-test.S | 6 ++++++ tools/testing/selftests/arm64/fp/zt-test.S | 5 +++++ 3 files changed, 21 insertions(+) --- base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab change-id: 20231204-arm64-kselftest-log-svcr-372a210520ae Best regards, diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index 547d077e3517..fff60e2a25ad 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -515,6 +515,10 @@ function barf mov x11, x1 // actual data mov x12, x2 // data size +#ifdef SSVE + mrs x13, S3_3_C4_C2_2 +#endif + puts "Mismatch: PID=" mov x0, x20 bl putdec @@ -534,6 +538,12 @@ function barf bl dumphex puts "]\n" +#ifdef SSVE + puts "\tSVCR: " + mov x0, x13 + bl putdecn +#endif + mov x8, #__NR_getpid svc #0 // fpsimd.c acitivty log dump hack diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S index 9dcd70911397..095b45531640 100644 --- a/tools/testing/selftests/arm64/fp/za-test.S +++ b/tools/testing/selftests/arm64/fp/za-test.S @@ -333,6 +333,9 @@ function barf // mov w8, #__NR_exit // svc #0 // end hack + + mrs x13, S3_3_C4_C2_2 + smstop mov x10, x0 // expected data mov x11, x1 // actual data @@ -356,6 +359,9 @@ function barf mov x1, x12 bl dumphex puts "]\n" + puts "\tSVCR: " + mov x0, x13 + bl putdecn mov x8, #__NR_getpid svc #0 diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S index d63286397638..b5c81e81a379 100644 --- a/tools/testing/selftests/arm64/fp/zt-test.S +++ b/tools/testing/selftests/arm64/fp/zt-test.S @@ -267,6 +267,8 @@ function barf // mov w8, #__NR_exit // svc #0 // end hack + + mrs x13, S3_3_C4_C2_2 smstop mov x10, x0 // expected data mov x11, x1 // actual data @@ -287,6 +289,9 @@ function barf mov x1, x12 bl dumphex puts "]\n" + puts "\tSVCR: " + mov x0, x13 + bl putdecn mov x8, #__NR_getpid svc #0