From patchwork Fri Jun 9 02:12:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Xu X-Patchwork-Id: 105248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp667374vqr; Thu, 8 Jun 2023 19:26:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LcInhrOusb2Yv/pJ8YEGY/wo7/Aygm/8+C5UapBCIGfPxH2GrTB7TRiTxUBMla+HVesRs X-Received: by 2002:a05:6808:10c9:b0:398:e4c:d5c2 with SMTP id s9-20020a05680810c900b003980e4cd5c2mr335927ois.9.1686277559792; Thu, 08 Jun 2023 19:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686277559; cv=none; d=google.com; s=arc-20160816; b=NzS2vXwT+4S+aGFU44VVMqJ8WfVRpG/pt7I/5schf3uopLPPCdjpS/cwrzju55pbHO 7yVcegu1KNXVtdT/UgxNKf0+1jaOF9zo1JJXp1KejJqPOsET8yK3P5VyfpNvMhMYM6t5 pcQDLGA7InGtZdurRC0YofKRtAIegyUv6FqrTqaepe2aryTOgocrohylpfSkMXPVMfoL KOdqFFjYYytw1NbNBtlzmW5bCNE7c5JjELvP7FroFiZZJdjpTQzT2B/eR5iAjjXNaPzK A5ZXBs+OAVRsA2hXHZUY0h6MBXwxlVxnEX1dcJugKFI3zUfcoKE9CkG1o79v1Mii6Afh BC0g== 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=pmrYh6luanuSB/dsFZFnbV3GBRmceUO4KKmoZd7PlkE=; b=Tvjwu6/BZXbjQE3uuNvpfzpS+EvT1TEL7/quIyGTGTKadDicFMYUdMEvKNEvs6u+9h OuykGg1uU4Yye13GpRNnIPB8535cPl/Wy4ZV2d781kxa991uuyV1xfZmKcZQE8kAS07O q7S9A17X6mLSJNOB5uuauz1sLPqWYk+EIxcF3GPBn4WK/fhAPrxiqTLo3rzWPZCQQa2n o1JZEEQF5t/t86zaimt8MeYLlsllDHFtYju1Gpjr9wZqRWAcYb8JL18nVfw/pED1v53t WiiYBI+iZAEuxahkuYwQNfFjTXInjo/lK/C3LIdLBomdVi/P5fC+1pH+J4GnH4yU98cH K0bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=inPqQoIV; 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 q7-20020a17090a304700b0023af4ee47dasi3631045pjl.65.2023.06.08.19.25.45; Thu, 08 Jun 2023 19:25:59 -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=inPqQoIV; 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 S238184AbjFICGo (ORCPT + 99 others); Thu, 8 Jun 2023 22:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238158AbjFICGl (ORCPT ); Thu, 8 Jun 2023 22:06:41 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87E6F30EB; Thu, 8 Jun 2023 19:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686276400; x=1717812400; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SG9GcgXHxEAjLOgy9zCFtnTjBIS7anAQ+78nBSk9tVQ=; b=inPqQoIV1rpmKNlV0xO/MoGkRapQuj6po04vdqDuC15lDxhYCLYrDRRM ZcIV+YzxYEuP7/IDTnjcjLWr/vIUweQwuBPggt4slyGmi0bzYIcf8IYqN icEwWROdSYjlNmLdZ+qsfSERzK1qR635NC9AOUj1+eU2LAvRk77IWuuIU yA/hMzMlFWNqwZyVldmcDwISkqXsqpH7P0ZE0Y6xavjLZEoYyHRWXUSoB c1m1pSCHTRPPL3uko1Ng3yVBGiZrnTVyn7JBdDm5qPJt3N9RtiME5Y9AD 5JTewXxtuXDLmH7MjEEWbaUbQYrFhUOfobMafLB3OgCRTUGJsdRpCi0Ff A==; X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="359975220" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="359975220" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 19:06:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="713334571" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="713334571" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 19:06:33 -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 , Ben Gardon , David Matlack , Vipin Sharma , 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 v3 02/10] KVM: arm64: selftests: Drop SVE cap check in print_reg Date: Fri, 9 Jun 2023 10:12:10 +0800 Message-Id: <0b69ae670aee3a1e2264ffde8b4873286b9a2151.1686275310.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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768190178394443520?= X-GMAIL-MSGID: =?utf-8?q?1768190178394443520?= 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 c152523a5ed4..915272c342f9 100644 --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c @@ -100,16 +100,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) { /* @@ -287,10 +277,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",