Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1113369rwj; Sun, 18 Dec 2022 02:20:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf5JBz2a8QiiGX1Nn2qdWmh9tBrsl3SpDHsLV4WH1XZZwcElIpv5W6AoeUGPZ8hFWb2orKMW X-Received: by 2002:a05:6402:3609:b0:461:8be6:1ac5 with SMTP id el9-20020a056402360900b004618be61ac5mr31031179edb.3.1671358813191; Sun, 18 Dec 2022 02:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671358813; cv=none; d=google.com; s=arc-20160816; b=gAY6gTvtVNRhY5XSYWafp6ohkx8c/EF38nQJNIE9o3+Dq0YPwcJEh74qk9HKnPoQis wzW9oQ58XnpmMrVVR+RH96N1YFzccNQkXRYcojBjOEp8ukuBGN6kQf51adZRsElNpTqU Lj0GVBbyrlGWkwdCNocWKbRvviBfiXB7oB/t0PBKaa6UsGYHf6gX82/2dStui0VykwWe KyNYRNmK4wgMV2RiPQPm07GNHUBU5kTrjAnCldrFPeIw+oPgXc68WAzyUOLfIZ0FzOBR AIVe/quo1VSB044dtGf/0J0wY8LV+xc6PiC/gYZugHG0ZcKGlDo0QkeI8M0Pr1d2qYSn ibJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DdnZzD5v9px5VNPOf6/zm+KsOUVYKv3iHzB3BMk6h5M=; b=TW8hZ35elnmYZeUQpHU0qaeFlbbUENj+CPsaPhB0ageZYrAyHTv0PyoWs1v1Zxu/iE ZyQaf3eM0lirsOvulWJGelRQ13HB9lnhEVAXZnAtfKWb51ItLotzuGveOFSaJHeRN1ZX lml7Z7orrWs27rNm63/SKJfx2WIV9VUIriLwqAFw2Q08tpBc6O39009ZkKXu/FyQad+8 9Os6g1d9SXB1M4wt4EvRiVXtYrhhP8MNEAzN4iPqOW2nHUEhT8iYjrK2Vb+Wzhuv2qdJ d68m2me9WFnG4gH0tXO95toZSz8SmX6lnIVDC17Aioa/fpr82kV1ZJvpAITqc9xrAPJW MmYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020aa7ce0b000000b0046cd5d896c3si6063637edv.165.2022.12.18.02.19.57; Sun, 18 Dec 2022 02:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230230AbiLRJ36 (ORCPT + 69 others); Sun, 18 Dec 2022 04:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbiLRJ3z (ORCPT ); Sun, 18 Dec 2022 04:29:55 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E35EDE87; Sun, 18 Dec 2022 01:29:54 -0800 (PST) Received: from kwepemm600007.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NZcwJ43lXzmWMl; Sun, 18 Dec 2022 17:28:48 +0800 (CST) Received: from DESKTOP-8RFUVS3.china.huawei.com (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sun, 18 Dec 2022 17:29:51 +0800 From: Zenghui Yu To: , , CC: , , , , , Zenghui Yu Subject: [PATCH 2/2] kselftest/arm64: Correct buffer size for SME ZA storage Date: Sun, 18 Dec 2022 17:29:42 +0800 Message-ID: <20221218092942.1940-2-yuzenghui@huawei.com> X-Mailer: git-send-email 2.23.0.windows.1 In-Reply-To: <20221218092942.1940-1-yuzenghui@huawei.com> References: <20221218092942.1940-1-yuzenghui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It looks like a copy-paste error to describe the ZA buffer size using (the number of P registers * the maximum size of a Z register). This doesn't have practical impact though as we're always allocating enough space even for the architectural maximum ZA storage, with SVL equals to 2048 bits. Switch to use ZA_SIG_REGS_SIZE(SVE_VQ_MAX). setup_za() will need to initialize two 64MB arraies with this change and can be optimized later (if someone complain). Signed-off-by: Zenghui Yu --- tools/testing/selftests/arm64/abi/syscall-abi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/arm64/abi/syscall-abi.c b/tools/testing/selftests/arm64/abi/syscall-abi.c index 24a498029c78..4adeb21f500e 100644 --- a/tools/testing/selftests/arm64/abi/syscall-abi.c +++ b/tools/testing/selftests/arm64/abi/syscall-abi.c @@ -282,8 +282,8 @@ static int check_svcr(struct syscall_cfg *cfg, int sve_vl, int sme_vl, return errors; } -uint8_t za_in[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; -uint8_t za_out[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; +uint8_t za_in[ZA_SIG_REGS_SIZE(SVE_VQ_MAX)]; +uint8_t za_out[ZA_SIG_REGS_SIZE(SVE_VQ_MAX)]; static void setup_za(struct syscall_cfg *cfg, int sve_vl, int sme_vl, uint64_t svcr) -- 2.33.0