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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 6F5C4C432BE for ; Thu, 29 Jul 2021 09:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5631561058 for ; Thu, 29 Jul 2021 09:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231488AbhG2Jx6 (ORCPT ); Thu, 29 Jul 2021 05:53:58 -0400 Received: from foss.arm.com ([217.140.110.172]:43760 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235592AbhG2Jx5 (ORCPT ); Thu, 29 Jul 2021 05:53:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BEC7C6D; Thu, 29 Jul 2021 02:53:54 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D905D3F73D; Thu, 29 Jul 2021 02:53:53 -0700 (PDT) Date: Thu, 29 Jul 2021 10:52:33 +0100 From: Dave Martin To: Mark Brown Cc: Catalin Marinas , Will Deacon , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2 2/4] kselftest/arm64: Validate vector lengths are set in sve-probe-vls Message-ID: <20210729095232.GI1724@arm.com> References: <20210728163318.51492-1-broonie@kernel.org> <20210728163318.51492-3-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728163318.51492-3-broonie@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, Jul 28, 2021 at 05:33:16PM +0100, Mark Brown wrote: > Currently sve-probe-vls does not verify that the vector lengths reported > by the prctl() interface are actually what is reported by the architecture, > use the rdvl_sve() helper to validate this. > > Signed-off-by: Mark Brown Reviewed-by: Dave Martin > --- > tools/testing/selftests/arm64/fp/Makefile | 2 +- > tools/testing/selftests/arm64/fp/sve-probe-vls.c | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/arm64/fp/Makefile b/tools/testing/selftests/arm64/fp/Makefile > index ed62e7003b96..fa3a0167db2d 100644 > --- a/tools/testing/selftests/arm64/fp/Makefile > +++ b/tools/testing/selftests/arm64/fp/Makefile > @@ -13,7 +13,7 @@ fpsimd-test: fpsimd-test.o > $(CC) -nostdlib $^ -o $@ > rdvl-sve: rdvl-sve.o rdvl.o > sve-ptrace: sve-ptrace.o sve-ptrace-asm.o > -sve-probe-vls: sve-probe-vls.o > +sve-probe-vls: sve-probe-vls.o rdvl.o > sve-test: sve-test.o > $(CC) -nostdlib $^ -o $@ > vlset: vlset.o > diff --git a/tools/testing/selftests/arm64/fp/sve-probe-vls.c b/tools/testing/selftests/arm64/fp/sve-probe-vls.c > index 76e138525d55..a24eca7a4ecb 100644 > --- a/tools/testing/selftests/arm64/fp/sve-probe-vls.c > +++ b/tools/testing/selftests/arm64/fp/sve-probe-vls.c > @@ -13,6 +13,7 @@ > #include > > #include "../../kselftest.h" > +#include "rdvl.h" > > int main(int argc, char **argv) > { > @@ -38,6 +39,10 @@ int main(int argc, char **argv) > > vl &= PR_SVE_VL_LEN_MASK; > > + if (rdvl_sve() != vl) > + ksft_exit_fail_msg("PR_SVE_SET_VL reports %d, RDVL %d\n", > + vl, rdvl_sve()); > + > if (!sve_vl_valid(vl)) > ksft_exit_fail_msg("VL %d invalid\n", vl); > vq = sve_vq_from_vl(vl); > -- > 2.20.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 B74F7C4338F for ; Thu, 29 Jul 2021 09:56:00 +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 8B4C260C3F for ; Thu, 29 Jul 2021 09:56:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8B4C260C3F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dJvoc3i7+MJNYBhpdMy02kjpODyj8Sd9lJ2MQTkpfyY=; b=mvydUK9CLRbECd FMy6asoKcg0o3lOTd758vrzQ0F2wJn3Guthzz0nr2gwR8QJlPhMWT+k27ywpsJb2fsAAiRFUlsk2S 67Kqrs7YxpgGqiM1n9Kn0w3XczxgPHhBR5mjdVPwhXBhv6QT+xbaotcDNo9xzdBPXpjeCHWZ/gDuy 8N0+n2WJEGPunPz5rqmR10ccrlm33Uub4gx/LDQcddxC36JzebN6+4gte7LKLiaZDdYcNE54Po35k XMRXfv4K8CSK08wKwi/vvzN5HoKQTQEMJ1Zczhbd/+YQvWs5Q82GMoYnSrUa+bjkU11g245p6T6JW R8kF+PEKs9z0N4fdGKjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m92jx-003idB-2p; Thu, 29 Jul 2021 09:54:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m92jj-003iad-CG for linux-arm-kernel@lists.infradead.org; Thu, 29 Jul 2021 09:53:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BEC7C6D; Thu, 29 Jul 2021 02:53:54 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D905D3F73D; Thu, 29 Jul 2021 02:53:53 -0700 (PDT) Date: Thu, 29 Jul 2021 10:52:33 +0100 From: Dave Martin To: Mark Brown Cc: Catalin Marinas , Will Deacon , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2 2/4] kselftest/arm64: Validate vector lengths are set in sve-probe-vls Message-ID: <20210729095232.GI1724@arm.com> References: <20210728163318.51492-1-broonie@kernel.org> <20210728163318.51492-3-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210728163318.51492-3-broonie@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210729_025355_506483_BE13C3A2 X-CRM114-Status: GOOD ( 18.66 ) 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 On Wed, Jul 28, 2021 at 05:33:16PM +0100, Mark Brown wrote: > Currently sve-probe-vls does not verify that the vector lengths reported > by the prctl() interface are actually what is reported by the architecture, > use the rdvl_sve() helper to validate this. > > Signed-off-by: Mark Brown Reviewed-by: Dave Martin > --- > tools/testing/selftests/arm64/fp/Makefile | 2 +- > tools/testing/selftests/arm64/fp/sve-probe-vls.c | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/arm64/fp/Makefile b/tools/testing/selftests/arm64/fp/Makefile > index ed62e7003b96..fa3a0167db2d 100644 > --- a/tools/testing/selftests/arm64/fp/Makefile > +++ b/tools/testing/selftests/arm64/fp/Makefile > @@ -13,7 +13,7 @@ fpsimd-test: fpsimd-test.o > $(CC) -nostdlib $^ -o $@ > rdvl-sve: rdvl-sve.o rdvl.o > sve-ptrace: sve-ptrace.o sve-ptrace-asm.o > -sve-probe-vls: sve-probe-vls.o > +sve-probe-vls: sve-probe-vls.o rdvl.o > sve-test: sve-test.o > $(CC) -nostdlib $^ -o $@ > vlset: vlset.o > diff --git a/tools/testing/selftests/arm64/fp/sve-probe-vls.c b/tools/testing/selftests/arm64/fp/sve-probe-vls.c > index 76e138525d55..a24eca7a4ecb 100644 > --- a/tools/testing/selftests/arm64/fp/sve-probe-vls.c > +++ b/tools/testing/selftests/arm64/fp/sve-probe-vls.c > @@ -13,6 +13,7 @@ > #include > > #include "../../kselftest.h" > +#include "rdvl.h" > > int main(int argc, char **argv) > { > @@ -38,6 +39,10 @@ int main(int argc, char **argv) > > vl &= PR_SVE_VL_LEN_MASK; > > + if (rdvl_sve() != vl) > + ksft_exit_fail_msg("PR_SVE_SET_VL reports %d, RDVL %d\n", > + vl, rdvl_sve()); > + > if (!sve_vl_valid(vl)) > ksft_exit_fail_msg("VL %d invalid\n", vl); > vq = sve_vq_from_vl(vl); > -- > 2.20.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel