From patchwork Tue Jul 25 08:41:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Xu X-Patchwork-Id: 125427 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2329149vqg; Tue, 25 Jul 2023 01:50:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvHQEVdmbb8axjGSKvgmnQHq3tTkGVPoWorE3Gh9S5yUxBLyf1mqoYPsjP3IW47Xk3JYyO X-Received: by 2002:a17:906:77cf:b0:992:ef60:ab0d with SMTP id m15-20020a17090677cf00b00992ef60ab0dmr12416192ejn.69.1690275012049; Tue, 25 Jul 2023 01:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690275012; cv=none; d=google.com; s=arc-20160816; b=IY6bYpubC3DPxtqCx4/Rfo/bQUCyyIwcj2IY4f8uE+ligtJhXSIfgLz7E6diKYeH7O ldVUEvaLPCzazfRPzJnCOFv2LhKD69hq24Gx3Ui1wjCls3xnzYoRiw7l7szNNq+KPLLa qLVf1ZXeCC20PEEJ0JEIvi0P2F4gqc66+3rlZ4BdePz9YsyWhZ0gOie1UY3nfk71mFsq F233hXbRFjf0VXsVIHJiAhkSKCoBhzCGMRycAgtiPAXTUOMNEvmjTllVVC1A2w4Y/jud SlttvQAJoajZXVrIPbFYu1MZoivM8T1yYREffZkhRq4zoCEYAid1s/+ADKpi30tQvHjn UJuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=pHKVWm9dmoR3pfWRr63JD2Qv6UUSs2h8Ok2GACCXo7U=; fh=CiTFpyOpcwpimzIq6z806+F1tNAkZjsgYNrF/eZQ2Y8=; b=hlnZdDZaWOtl1JfMwCpwqzaQ71hIMdGlqKeb1CRa2NZ7O7E1jC3ZXz3oVUN6b3WEjs B40iy5X+Fa7XJHVPn3xL6ymxOT1RTnhn/4P3uKTM2UsPamfoffY/KdtLNdEWyVJP9ipT rWH8uFJD7Xe6qfdMI++wMQrvugoWwqhtpDCaFeIMoR+kGFH8YOB6rzWrfiN/pmrWJKNA 2+uT6Ve0TM7t6Wii0e4I1R66dmq1Pg0lunwKTI/6AkzGo5iWbLWr4abmniWSKWTQMdW5 8yrqL9JB9YpkntWMNG5e4AzQO083gZO2tZxxy0rlxv5a6fRBx+Xs2b0FGtfwCRTHBMwd GgKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=P4Ga7PIB; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lf6-20020a170906ae4600b00992e98bed27si7912086ejb.640.2023.07.25.01.49.47; Tue, 25 Jul 2023 01:50:12 -0700 (PDT) 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; dkim=fail header.i=@intel.com header.s=Intel header.b=P4Ga7PIB; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbjGYIgk (ORCPT + 99 others); Tue, 25 Jul 2023 04:36:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232062AbjGYIgc (ORCPT ); Tue, 25 Jul 2023 04:36:32 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C50410E5; Tue, 25 Jul 2023 01:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690274191; x=1721810191; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+NwLmmjKl1l2MfnmGP5ndFqexOF8eG8HTnqVqUF4hZE=; b=P4Ga7PIBwseJd8C4DXFox353xs/Q4FrRxh4UzToFU8w11iJBEmzWTZSg o7pKrrgtxMXjupJYltZhfKvS12K0NFiY0GPK88+w3uNqJT8c81xVkso18 qfbOC4Tuki2odIrWE9E6snIch90uAgitNyO4hxUOvc2GfmWPgavfLKaOw 0w1zmxPRUFOf90UnXxqOeMiYh1ReIAhkzSKScejk/Cl8r+wvo/1SnDAxF 3mshtEDgK8C8NIAi8V+VkkMf0LiKkbIInec4MKY6K/tFUZlwsb9HPyWJ8 v62mNa6CrzGSUf6+eIluM5o4YhT4+VLqYTLHdxwInQcTe71xWQ1wnbnGh Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="371264343" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="371264343" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:36:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="761130185" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="761130185" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:36:21 -0700 From: Haibo Xu Cc: xiaobo55x@gmail.com, haibo1.xu@intel.com, ajones@ventanamicro.com, maz@kernel.org, oliver.upton@linux.dev, seanjc@google.com, Paolo Bonzini , Jonathan Corbet , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Shuah Khan , James Morse , Suzuki K Poulose , Zenghui Yu , Ricardo Koller , Vishal Annapurve , Vipin Sharma , David Matlack , Colton Lewis , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: [PATCH v6 02/13] KVM: arm64: selftests: Drop SVE cap check in print_reg Date: Tue, 25 Jul 2023 16:41:28 +0800 Message-Id: <6647e775594e44bf58a90564dc4312cdcb2d45e9.1690273969.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772381811043250685 X-GMAIL-MSGID: 1772381811043250685 From: Andrew Jones The check doesn't prove much anyway, as the reg lists could be messed up too. Just drop the check to simplify making print_reg more independent. Signed-off-by: Andrew Jones Signed-off-by: Haibo Xu --- .../testing/selftests/kvm/aarch64/get-reg-list.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c index 52244de20dce..335bd5eb250a 100644 --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c @@ -129,16 +129,6 @@ static const char *config_name(struct vcpu_config *c) return c->name; } -static bool has_cap(struct vcpu_config *c, long capability) -{ - struct reg_sublist *s; - - for_each_sublist(c, s) - if (s->capability == capability) - return true; - return false; -} - static bool filter_reg(__u64 reg) { /* @@ -335,10 +325,7 @@ static void print_reg(struct vcpu_config *c, __u64 id) printf("\tKVM_REG_ARM_FW_FEAT_BMAP_REG(%lld),\n", id & 0xffff); break; case KVM_REG_ARM64_SVE: - if (has_cap(c, KVM_CAP_ARM_SVE)) - printf("\t%s,\n", sve_id_to_str(c, id)); - else - TEST_FAIL("%s: KVM_REG_ARM64_SVE is an unexpected coproc type in reg id: 0x%llx", config_name(c), id); + printf("\t%s,\n", sve_id_to_str(c, id)); break; default: TEST_FAIL("%s: Unexpected coproc type: 0x%llx in reg id: 0x%llx",