From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E7C5C77B7A for ; Thu, 25 May 2023 07:35:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239488AbjEYHf1 (ORCPT ); Thu, 25 May 2023 03:35:27 -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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 D3662C77B7E for ; Thu, 25 May 2023 07:35:37 +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=ku3RKPsW5CZ6NH0LQ4eB94LCOpgm6bc7i67WyxBNBX4=; b=yg7D4GYbrA7mKb pUhUet3iFCyWFE3Wfq1bQB31JEQLx6jIRX/xBSiUqv6r61daOZSxl8GLVIhnRYXgv1jUaq4tkeZVq Bq57IAJ2HCXRHwLu3eBWfINEnCrAKHE4U1ZK5kw5fioRSo9QuC86/hXPLIq8QoQSsVSVY+tz9Haba IbX26varEiLecMJB8krQjhRbclFokghOXv69EqnWrThSOoQFqBB/tx/LlAagYL/Shl5mcsG0Mg6k/ wxvM1l/tCnw3JEOJkmX3MeqQDqlkevChOTGAC2LfXi4NaBh0Gk/SfuL5rR3hK1CE579gl35461tZT N9TSgwfMUb4BKCBS7qVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q25VV-00FooK-3C; Thu, 25 May 2023 07:35:33 +0000 Received: from mga06b.intel.com ([134.134.136.31] helo=mga06.intel.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q25VI-00FoZv-28; Thu, 25 May 2023 07:35:22 +0000 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="417280978" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="417280978" 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 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 , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230525_003520_757723_F622F153 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- .../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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A4348F53 for ; Thu, 25 May 2023 07:35:20 +0000 (UTC) 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="417280982" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="417280982" 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 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 , 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: Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 16808C7EE37 for ; Thu, 25 May 2023 07:35:53 +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=VJraV0sjmgBc/C3UbmX9QlFHgmMDQ7b93GVpzVthYA0=; b=f26+F8bB47+bNC hTlIthmfLkXPp1O7GkFwgmMcOGHtfSmWARgAp+jU8zvSQ5KhBrYwIPocjT6u4TJeXSHCgFQIGW0fP GNrtopLkZFwtrfyAYRu22NXH3I/NqBUn/90Akyl3Kpv67nESYrKqmEnOC84KXppH+iBLXQnaW7ni7 /cN5NNYr3dUde7CipkQ8SDnBawM0Qb6a7/0OhBar3sLjuOfYxmBLvbsef953jB3Exm7/U0m+O8e8Q 9S4rwdM3Vv9MdwPPjz2tADIsiX12rz71ra302AbRfSvt9xcI5TEHVC4w+4P0NQoRhvY+GBvBQqdjG K3moLwvq5KN8mjP++2Ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q25VT-00Foma-1a; Thu, 25 May 2023 07:35:31 +0000 Received: from mga06b.intel.com ([134.134.136.31] helo=mga06.intel.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q25VI-00FoZv-28; Thu, 25 May 2023 07:35:22 +0000 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="417280978" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="417280978" 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 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 , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230525_003520_757723_F622F153 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 --- .../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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel