Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12256980rwd; Fri, 23 Jun 2023 03:45:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5hPt94vLlPm5o3+E/sycHIyw0vLt6PblPYJ6zX8fdWRo+vGHyE4xIzE138mS0nI46FmfU9 X-Received: by 2002:a05:6808:2a46:b0:3a0:4567:80b1 with SMTP id fa6-20020a0568082a4600b003a0456780b1mr9235864oib.12.1687517147950; Fri, 23 Jun 2023 03:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687517147; cv=none; d=google.com; s=arc-20160816; b=e85EBhJer8BrkidlrfvSVeVAlx3cn4CsoxTGfNDc1Raom8dQzQD7WaRs/AiLfCboJ7 YjoqDgdvonoE6NDdum2glKveYH8Bzmv/EHPr7+9/4HXCbzK86yQ1mKL4x8kkvBcIlLBv iaO4mx+hO4NeCeRkoi2ayvvsQ6E0xaxr3roGFNTQxGZvzBuSfIKGxFeQxb5rxEywAbff Q7fQJe3Nza5Dd+C3k/+vcvEvpvD3ajrGO0hPy0XMOwRVPewfzcbZ1Fnfytg08gkILgTz /+Godl2iUZhGC2/Bw2+JP2RvRmmRRy0UZXZeeNRxLlfG1OzCCetkzWowNBYkiWrJkJJ3 ZXKQ== 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=La7GsPW5Gmyo95nQuDTW1MrwUbmrn8fqCKyahOp+5DmT5xeSF0tu5E/auNCAjt49Dn Y1+uusWnJhSIf20Ksi2yg3Z381W3DFewaC4+X9iP0gFvV8LBA/VbY0iLiuOtEFWgVbbX Ri+Ju46STXWILGJ3wVdYZPGdAg/1XW2tMcBe8+nvPlnlAEEhuN4cVxxeKj4ssDW69KSR pZZbojRpcJwBjLMtfNXzGSKBtJMKb4bPc++tYeFPbjVjXG6z+qT8JDWpin1UZcp1DJiP UwaVWl0Ff+WRyD9sAghT7O3eEA8bvYDEY2SyDamCjwQqi142kXOj8ugAvzOxHYjckTbP JIDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=iSq4HwX6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a17090a190d00b00253326d4e5bsi1681633pjg.57.2023.06.23.03.45.35; Fri, 23 Jun 2023 03:45:47 -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=iSq4HwX6; 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 S232223AbjFWKfG (ORCPT + 99 others); Fri, 23 Jun 2023 06:35:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbjFWKfC (ORCPT ); Fri, 23 Jun 2023 06:35:02 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 573B3172A; Fri, 23 Jun 2023 03:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687516497; x=1719052497; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SG9GcgXHxEAjLOgy9zCFtnTjBIS7anAQ+78nBSk9tVQ=; b=iSq4HwX6KHReNNNdm3Sy6nioVUy/8aKoWqVF6qweGy2frcm84bzMh4Um ZfmLIDvg9ot+u45b8nYDH206vF07EFTM0seB9wVl0JTcnmqXMZkbsOygV IqgEoaaDaMzg3Whnx756TNthU1Qms/TZMyCvkpuc3zL6ekCGG3yaJT6OX mtgT5KFtzF48xmS2aT6I1Sq8ZfF+/Gt6ze3RVZNzQUSzUmN/W/Px/nD5R girdWzk3tg8GNlknW6mZpjFMF7H3k7hJwSHEVqvd0wq4CjVGBApmVhmHf iE2WxDCj4zLXk62Xy4SZLENc0ASVsotCGnAL9uVP7iuWyLbSeHALcYxBg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10749"; a="447112331" X-IronPort-AV: E=Sophos;i="6.01,151,1684825200"; d="scan'208";a="447112331" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2023 03:34:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10749"; a="715275846" X-IronPort-AV: E=Sophos;i="6.01,151,1684825200"; d="scan'208";a="715275846" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2023 03:34:48 -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 , Ricardo Koller , Vishal Annapurve , 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 v4 02/12] KVM: arm64: selftests: Drop SVE cap check in print_reg Date: Fri, 23 Jun 2023 18:40:04 +0800 Message-Id: <66676d5e56b6e23e380e6182ab89b33d7c4bb18f.1687515463.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, 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 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", -- 2.34.1