From patchwork Sat Jul 1 13:42:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Xu X-Patchwork-Id: 115032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp11045127vqr; Sat, 1 Jul 2023 06:39:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrpaOVAerh2ceWrZWWbOi7dEQ6x3Luff5MzU6u5pLLJHyQVLOgH2HNr8GkE0q97lOFB+qS X-Received: by 2002:a05:6a00:2d1d:b0:67a:a906:9edb with SMTP id fa29-20020a056a002d1d00b0067aa9069edbmr6887953pfb.30.1688218760928; Sat, 01 Jul 2023 06:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688218760; cv=none; d=google.com; s=arc-20160816; b=gfcTT2XtpmkL1pyXM8rj60eIth92CGwRPllfGynvIZ3v2kvledJXBpieoKWN0J7YtD LkFSshlCZuimJrrlpqq17+o7gws9ARZbvvsNwU1hdol/cbO7hv5dwKrLfGicVIoLCcpy w0eL9MQdEoqt+9DaxKJLA7EPjTkHmZUgMOMSH9pM01sHIzAP4kx9xwxe9CV8D6srzfwl WMBcnbmqub3NOLiNvMd6dqYNznS8yanB3P+sleBgdChYKx1rdR8/DmvhWiL4tn43WgVL H+0QXONlPbJTXZ/PLrRMphNaiE8JjBqIWqvTIVXUXas57j+IwlhupCVq2O2N1zZBRMtD N2kA== 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=; fh=t5Ra4m2YxRKhU4WbIwyb+raTVIOmXdZcxHU0Z8Y+pgE=; b=YKqo6Au2bEMGZ4v8x1IOTHpILXd50WFoMgcD0nhdF+ub49axH0M6lR1XhRCAwwb8Pd g69c0orss+PQfTvD5RUQIPkNQlXJcLh5M0JunTJct+SSEAF0+3YZVjRQ59wfrps7gF/0 QjWJgonPyLJEpj/rZuupST2QLwYflnZxH1/79fle2SjPOd8qkmbl6tbLaAvmnIYgUpVp MCUOC71q54toxLB0H/IAAtv8j4LhukxUgrdrjj0KqiXdRyoOqjJ9UIueXkErzbpf7P4a 0yTNacAwGkOj8nm8CeNETO+cXQXlnRPlYo8tP8l1udIvYpCKmTHH+TVIT+tSxbJ1QAwJ NKbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b="HYs/QV7E"; 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 w3-20020a634903000000b0054ff5fb84dfsi13800405pga.191.2023.07.01.06.39.06; Sat, 01 Jul 2023 06:39:20 -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="HYs/QV7E"; 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 S230175AbjGANhn (ORCPT + 99 others); Sat, 1 Jul 2023 09:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjGANhk (ORCPT ); Sat, 1 Jul 2023 09:37:40 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFF873C21; Sat, 1 Jul 2023 06:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688218653; x=1719754653; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SG9GcgXHxEAjLOgy9zCFtnTjBIS7anAQ+78nBSk9tVQ=; b=HYs/QV7ExIAkzkSJobKHNaRIWBD2FWr3aIXa/8xtR1N50AdIECzbYIH/ Mr8nr3WYAQ3yQhNJt0gHAl7a5QTYyElU9OHbLvnUecAMK+RaaJGHM97C0 p+hhsKF7A1mOJa9ng0ijQm0W/HEUXJrWM0waTt9lWqaYju/Hf6L9bSAUy HD0GYBx4k2r6qgkmHuov3b/JwsLdept20dSTQahJdwKuM4PgBtYvuAVrv oup+MMmMkd90j2ojyOPVRQmhoZMg+t16O905joHo26uE9d05mSZoLaazP KRebINMuuKOAB0wyuik+So4/CKMb3w901lGeiOSPcz0+keUSZBYJGHPYu A==; X-IronPort-AV: E=McAfee;i="6600,9927,10758"; a="342926075" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="342926075" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2023 06:37:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10758"; a="747693864" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="747693864" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2023 06:37:24 -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 v5 02/13] KVM: arm64: selftests: Drop SVE cap check in print_reg Date: Sat, 1 Jul 2023 21:42:50 +0800 Message-Id: <66676d5e56b6e23e380e6182ab89b33d7c4bb18f.1688010022.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, 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?1770225675700368836?= X-GMAIL-MSGID: =?utf-8?q?1770225675700368836?= 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",