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: "Xu, Haibo1" X-Patchwork-Id: 13326080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88FD0C001DF for ; Tue, 25 Jul 2023 08:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MXgJYcKNCMLX7qOuGfz3eMLlewuOPqAxRP8Um3yWPKo=; b=rawhzNh77FFyKd WSJxaxc0FiXaVOXuDiy2NPDWu+w6Cdww+eufHj+sC9OdQiKi37ahgPBHTjqFzIZtMStZHu/pF6sJQ zfiwIhP6dcprGVcxFAl77H6ST0ipBLvSWoU5YfVn6xAykhEJ++qBM0yGPQrlz0xf93lSQzoN7M3AK MvKWE09lajKIrI0mVeNkRp/4GaYxXilGtOnV74A53Fgf7188HcTqHKinw1KXM4nAqfn8hpQix+fwn O+a1PSE1T827t/iO5P4qB2QqUBOg7N8Gbleq15nsvtF9I2r5DTpj9VMvK2zgMhQrrxeCIdc8iMOF9 +PEMEwR6pCMElx9fWZpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qODX2-006ktp-0p; Tue, 25 Jul 2023 08:36:36 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qODWx-006kqw-2r; Tue, 25 Jul 2023 08:36:33 +0000 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="371264352" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="371264352" 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 To: 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230725_013631_987170_860217ED X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 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",