From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EA8C4338F for ; Wed, 28 Jul 2021 16:34:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4402861019 for ; Wed, 28 Jul 2021 16:34:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbhG1QeJ (ORCPT ); Wed, 28 Jul 2021 12:34:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:37524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhG1QeI (ORCPT ); Wed, 28 Jul 2021 12:34:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AC6160F9B; Wed, 28 Jul 2021 16:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627490046; bh=fCHNswalWnKKT4wRuVuMlstt6Pv0dPNesVKNE64giRo=; h=From:To:Cc:Subject:Date:From; b=unDImntDPXxrdzerGWr7WwRnz+NTqL+QY4KJJibElwPxrWmfLf7F9KVWOaw7RhHRy wSrOUsnmio1HZWLrvOu6Tm2RrBQnImYoYKhP+BMifXctVxVyr58H+mCXDx6kfsnflJ tcpj1D3qOq72BnFnD4e+TWNcvBpj+TXPGTbdxxy3jeNHlfEVK3ly8kWAPXtrQcDBt6 tItLbmBRzt/fyNeGPH2/nsjYeaoDKBZs8PS5mfjq9WMsnRqYMsgHHbOHINKY0bovK+ viKDm4Em8vA6WsJ+2L+EoFyHpTu75BcHZVq0IuCSRUkOeoefc35xQySk4IfkceeOgv 4b+Eji9LpFXyw== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v2 0/4] kselftest/arm64: Vector length configuration tests Date: Wed, 28 Jul 2021 17:33:14 +0100 Message-Id: <20210728163318.51492-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2625; h=from:subject; bh=fCHNswalWnKKT4wRuVuMlstt6Pv0dPNesVKNE64giRo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhAYbI/iHcjDm2Tk8M4LY+hjzqmh4pI2kOIr4Y2t6l ZYKsrqKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYQGGyAAKCRAk1otyXVSH0DOkB/ 9n+Zx3xlvOIZ/r8A08bzH3/nSs+N7OAYdK4MU2rwVBuFAAN5g8ZnzdcgQuzylOsyNjgkVumt6sP7rf n2+0BA22WjTH8kCUIXtldAEzuzJhSbur0hitkiM3zYVMxMdV+Oy6RQv2WCsx3UeRp3OrReHRTLHMVq /fyEqcQ9TGwRMYBuZFroldhImL8XPPUwv+yT7fqTSz0WwB9b3Dd6px1FUZW1aW0m/xZd5/CnLlEyvW Tly7hmMHpv3hYDIY+eQkKodoZpyBblPJbN5EAVnifASiMKu40n3dviQBj2TC3wzOMXK1lYVuwz9rC1 r8z+VHvtoyzMKlHQZ9TPlRx1AtoHXI X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Currently we don't have full automated tests for the vector length configuation ABIs offered for SVE, we have a helper binary for setting the vector length which can be used for manual tests and we use the prctl() interface to enumerate the vector lengths but don't actually verify that the vector lengths enumerated were set. This patch series provides a small helper which allows us to get the currently configured vector length using the RDVL instruction via either a library call or stdout of a process and then uses this to both add verification of enumerated vector lengths to our existing tests and also add a new test program which exercises both the prctl() and sysfs interfaces. In preparation for the forthcomng support for the Scalable Matrix Extension (SME) [1] which introduces a new vector length managed via a very similar hardware interface the helper and new test program are parameterised with the goal of allowing reuse for SME. [1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/scalable-matrix-extension-armv9-a-architecture v2: - Tweak log message on failure in sve-probe-vls. - Stylistic changes in vec-syscfg. - Flush stdout before forking in vec-syscfg. - Use EXIT_FAILURE. - Use fdopen() to get child output. - Replace a bunch of UNIX API usage with stdio. - Add a TODO list. - Verify that we're root before testing writes to /proc. Mark Brown (4): kselftest/arm64: Provide a helper binary and "library" for SVE RDVL kselftest/arm64: Validate vector lengths are set in sve-probe-vls kselftest/arm64: Add tests for SVE vector configuration kselftest/arm64: Add a TODO list for floating point tests tools/testing/selftests/arm64/fp/.gitignore | 2 + tools/testing/selftests/arm64/fp/Makefile | 11 +- tools/testing/selftests/arm64/fp/TODO | 3 + tools/testing/selftests/arm64/fp/rdvl-sve.c | 14 + tools/testing/selftests/arm64/fp/rdvl.S | 9 + tools/testing/selftests/arm64/fp/rdvl.h | 8 + .../selftests/arm64/fp/sve-probe-vls.c | 5 + tools/testing/selftests/arm64/fp/vec-syscfg.c | 580 ++++++++++++++++++ 8 files changed, 629 insertions(+), 3 deletions(-) create mode 100644 tools/testing/selftests/arm64/fp/TODO create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c base-commit: ff1176468d368232b684f75e82563369208bc371 -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A13CAC4338F for ; Wed, 28 Jul 2021 16:36:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 679DC60EB9 for ; Wed, 28 Jul 2021 16:36:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 679DC60EB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:Message-Id:Date:Subject:Cc :To: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=xDFwZqqNrHvQLLhB4F8zNc+JLbe9LRpARiwTDJqOCRQ=; b=ZQfeONJnj7It8K vFTO83Dw4CSwNlyKYxz/wzfTJXRsdbZ8UGlXFyLNYcwQf0nl6hoUCTv4dbihK5Op32A9ioMHRm3Oi 5XVGeNYJM4mm/9m60d6JyJyB3/+zypheaLuAqGb05oZqoxu80DGOB/OSw0gHV41cM0QvFbHmmqDuT bsZcV2ADKCGXoiz+9RI7+1VsReT84+qKeTXy8irrnty88tvegjOBvFiyFrwEFHMXWHEH3Vt2ibifS 20HCCXaAWYJEUR0qRh8cXQhw0I0v7FyM639GG4xh62laOVwGBpySQ2AtBUZM4jtzXAZHLqD++Imgu PblET+blFAASUQiTGWng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8mVX-001dqr-QX; Wed, 28 Jul 2021 16:34:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8mVS-001dpy-Q6 for linux-arm-kernel@lists.infradead.org; Wed, 28 Jul 2021 16:34:09 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AC6160F9B; Wed, 28 Jul 2021 16:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627490046; bh=fCHNswalWnKKT4wRuVuMlstt6Pv0dPNesVKNE64giRo=; h=From:To:Cc:Subject:Date:From; b=unDImntDPXxrdzerGWr7WwRnz+NTqL+QY4KJJibElwPxrWmfLf7F9KVWOaw7RhHRy wSrOUsnmio1HZWLrvOu6Tm2RrBQnImYoYKhP+BMifXctVxVyr58H+mCXDx6kfsnflJ tcpj1D3qOq72BnFnD4e+TWNcvBpj+TXPGTbdxxy3jeNHlfEVK3ly8kWAPXtrQcDBt6 tItLbmBRzt/fyNeGPH2/nsjYeaoDKBZs8PS5mfjq9WMsnRqYMsgHHbOHINKY0bovK+ viKDm4Em8vA6WsJ+2L+EoFyHpTu75BcHZVq0IuCSRUkOeoefc35xQySk4IfkceeOgv 4b+Eji9LpFXyw== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v2 0/4] kselftest/arm64: Vector length configuration tests Date: Wed, 28 Jul 2021 17:33:14 +0100 Message-Id: <20210728163318.51492-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2625; h=from:subject; bh=fCHNswalWnKKT4wRuVuMlstt6Pv0dPNesVKNE64giRo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhAYbI/iHcjDm2Tk8M4LY+hjzqmh4pI2kOIr4Y2t6l ZYKsrqKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYQGGyAAKCRAk1otyXVSH0DOkB/ 9n+Zx3xlvOIZ/r8A08bzH3/nSs+N7OAYdK4MU2rwVBuFAAN5g8ZnzdcgQuzylOsyNjgkVumt6sP7rf n2+0BA22WjTH8kCUIXtldAEzuzJhSbur0hitkiM3zYVMxMdV+Oy6RQv2WCsx3UeRp3OrReHRTLHMVq /fyEqcQ9TGwRMYBuZFroldhImL8XPPUwv+yT7fqTSz0WwB9b3Dd6px1FUZW1aW0m/xZd5/CnLlEyvW Tly7hmMHpv3hYDIY+eQkKodoZpyBblPJbN5EAVnifASiMKu40n3dviQBj2TC3wzOMXK1lYVuwz9rC1 r8z+VHvtoyzMKlHQZ9TPlRx1AtoHXI 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-20210728_093406_914271_E76B68CC X-CRM114-Status: GOOD ( 13.86 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we don't have full automated tests for the vector length configuation ABIs offered for SVE, we have a helper binary for setting the vector length which can be used for manual tests and we use the prctl() interface to enumerate the vector lengths but don't actually verify that the vector lengths enumerated were set. This patch series provides a small helper which allows us to get the currently configured vector length using the RDVL instruction via either a library call or stdout of a process and then uses this to both add verification of enumerated vector lengths to our existing tests and also add a new test program which exercises both the prctl() and sysfs interfaces. In preparation for the forthcomng support for the Scalable Matrix Extension (SME) [1] which introduces a new vector length managed via a very similar hardware interface the helper and new test program are parameterised with the goal of allowing reuse for SME. [1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/scalable-matrix-extension-armv9-a-architecture v2: - Tweak log message on failure in sve-probe-vls. - Stylistic changes in vec-syscfg. - Flush stdout before forking in vec-syscfg. - Use EXIT_FAILURE. - Use fdopen() to get child output. - Replace a bunch of UNIX API usage with stdio. - Add a TODO list. - Verify that we're root before testing writes to /proc. Mark Brown (4): kselftest/arm64: Provide a helper binary and "library" for SVE RDVL kselftest/arm64: Validate vector lengths are set in sve-probe-vls kselftest/arm64: Add tests for SVE vector configuration kselftest/arm64: Add a TODO list for floating point tests tools/testing/selftests/arm64/fp/.gitignore | 2 + tools/testing/selftests/arm64/fp/Makefile | 11 +- tools/testing/selftests/arm64/fp/TODO | 3 + tools/testing/selftests/arm64/fp/rdvl-sve.c | 14 + tools/testing/selftests/arm64/fp/rdvl.S | 9 + tools/testing/selftests/arm64/fp/rdvl.h | 8 + .../selftests/arm64/fp/sve-probe-vls.c | 5 + tools/testing/selftests/arm64/fp/vec-syscfg.c | 580 ++++++++++++++++++ 8 files changed, 629 insertions(+), 3 deletions(-) create mode 100644 tools/testing/selftests/arm64/fp/TODO create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c base-commit: ff1176468d368232b684f75e82563369208bc371 -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel