Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp595490rwd; Thu, 25 May 2023 00:48:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7tjpdM2zprZPWb6TSJrbVchdr3rk8GfnxNRXHLcRqwWvWemxvfSxw4T/aITEb9BWIvGjcE X-Received: by 2002:a05:6a00:1a15:b0:64d:f5a:3fd2 with SMTP id g21-20020a056a001a1500b0064d0f5a3fd2mr6585949pfv.28.1685000888996; Thu, 25 May 2023 00:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685000888; cv=none; d=google.com; s=arc-20160816; b=BvC+SuIxjWbz9FqL8oMZSneBkQvB5PMzUY+Q98DuyTU5x97FBAWvhzl6Oh6TmEReru O/IcDFs8l3rh7X4W/7a0KLlnVNyCXT3j11EjfpuJdJG7sbMFXN8bAXmOUcReE7PO0gUi YHfSUgPS5lEI61cjbfgCqDZ2tt0YI+SrleOU8eAlGuIINt98dx9s8boKaYaJWHnzbJft z4/oPNN/9Jv5FGJHRBaSqmn8QD6e19meihAwRf6hYNwFIcYd9fumv8Gq34nZJv8qZtVK ISp43MxjfNgvHhtJZpMWtZ8W06KB/AkSJfQVX2WbRANSx4ogTauQkXKKiBpAaVKnZWe/ byMg== 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=Y7aK3bc2ypLORxJ2KpGOU+syiPY38eYf4N+AzOAIIZI=; b=M6gWmEBeNOSW87BuxP/a/eMvKCVXLgYAnXDu1KAQf95n3jRKZc1s4qkZssBxTlmwfq hV3sCjYnGWLprsCIebU8HxM8sI6h2E8fAHzOCGTLWNBhwkegbRRE5o+0PLLlz7y33QPB 9HlUPtD57BoZtpH0v0QAw2gYwsLWrissge/2CM9eBWiIrhp3Rui6O2D2qT8gOUvwTNfo Ju0o+/WPEobENpykDdSKdx7D32FbHSO7mLtfkh6UByoekCXkOL+g2ELs1WMVBx3iWbrF n5DL0QEu6dpmOdEjnDzssTvuJ1VyJ/zewA6ISPQJpke/1/HfvB4wqa1jIUf64uO8HShu v/Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=lMPmTih9; 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 g192-20020a636bc9000000b00528513a135bsi614727pgc.49.2023.05.25.00.47.55; Thu, 25 May 2023 00:48:08 -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=lMPmTih9; 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 S239472AbjEYHfZ (ORCPT + 99 others); Thu, 25 May 2023 03:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239374AbjEYHfV (ORCPT ); Thu, 25 May 2023 03:35:21 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8280D1B4; Thu, 25 May 2023 00:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685000120; x=1716536120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c+5BYx6uxDzf2AOSUkteXATXATp9lAsrDmetUgOlVVk=; b=lMPmTih9SnsLYtUi2njKtoKwcJ08vzwSCYZn34IQD1iWvmNa3ZRSVPbW 7i5zgFYQAXXDgoKwhoq++6qfGaT7D6E316Xkmu8Si9XZAeamz/MVuOnDd I4sxUOrUCognQBTfSqZ/l8TIZFPcohq1I9yx1IWDTwnFLvYgdClMdyfmQ xjHFU1AKhVuD+Y+kOVY+sTz9aAoiOhW78zZFXiAvQw5nmxFLkEsNCB/tV KdxyyMs65or/AmtJE/4E2VSa5Wh4c9Gx6W+oSuxmvb26aQLMaibnHtGrl MBs6S6Z4fIyu+QECsv+NULNl/bEIXFyDYrwW0hUIVR1noOOvpeVSbeL1X g==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="417280977" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="417280977" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2023 00:33:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="769774904" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="769774904" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2023 00:33:00 -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 , David Matlack , Ben Gardon , 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 v2 02/11] KVM: arm64: selftests: Drop SVE cap check in print_reg Date: Thu, 25 May 2023 15:38:26 +0800 Message-Id: <259df68b544dd7254fe4a65be8f39e9d766ac6da.1684999824.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 --- .../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