Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1398846rdh; Mon, 25 Sep 2023 11:29:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+jhysQ2+5NnPQI3FsaG9UsazthqboWgwP4IewD8kZMrzApF2Ox0ViZqxSN/dRrPS+cwEB X-Received: by 2002:a05:6a00:1a46:b0:68b:f3a4:ff6b with SMTP id h6-20020a056a001a4600b0068bf3a4ff6bmr5927017pfv.9.1695666549230; Mon, 25 Sep 2023 11:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695666549; cv=none; d=google.com; s=arc-20160816; b=OnWoF+qqaDU4JweZ1xeSl5yrVS3LjknBadK8/8A3JoFog9xMXCwEueFlZGyi3ZzEsw b7l2J3Hr+TTufBMUmuTRLkTTy1JS5V0C0Y+uEN1WpDyH8gb4/mvlVWkjFv0OcmYSQDzu 3zGQVRG0RyyGn4Mzt3riwvxvhm0U0W1OiEJ1S0AnJ/FJquJPVVdTadX4gJ53C4uuM5Vl KpzJkaew2YoC/8erf04BtBqsMIJrsfasQ+LA90MwfOSMu7VU3NkeEcvTyEy+nUpz64Ga tSgcmOwJ3qU4KJscyc2Klg/eMPFd3W6wxFerk8pPok+W7ZaZFjiTMX3SSKyH/Y/J1cIv XqFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4s1mdQKNja8rRVRNvpznVdJduDgGmg/7wDSFseU/UmI=; fh=Nnw/Dw3prVIT5KLOVQO3DcS15zu3mo0yAEjXPL5Uo9Q=; b=Td9/LwunLZ8WmtJOpdvIxwuuhwDknvVJfR5CdN34JFi5m5ppl4vU6FBBdDtGVM2ARW xqQfqb0yq5OYdw77e8UInA6slvaHcsd5ShxSJCJPWtlQBWyEO26XWAPkg1CipKumOqQf +V4zaFvveFMSq4p/ymFfLO48tfb3vOsiamxf5Oe/3ujKNoyH82xd/Z6a41kvgpVjU5NY hh7J49ViSn6uQ0iSXcy9jenMFCYcb5fC/5zmdQh+frQ1CXu4tsO4KvASF0XwBXtd9lw8 H7AtgpwNYxNGP/9Sgsid/czJdjTTgzBrPQmgICMPIfbO31QXfYlkjuQueWnzwHx5lYvP Zjow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=LrsLJ8qO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b13-20020a056a000ccd00b00690f74dd2ccsi11049470pfv.69.2023.09.25.11.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 11:29:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=LrsLJ8qO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 69DA7801C8B0; Mon, 25 Sep 2023 06:40:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232370AbjIYNkm (ORCPT + 99 others); Mon, 25 Sep 2023 09:40:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232354AbjIYNkW (ORCPT ); Mon, 25 Sep 2023 09:40:22 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBADCCD9 for ; Mon, 25 Sep 2023 06:40:13 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c44c0f9138so44156055ad.2 for ; Mon, 25 Sep 2023 06:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695649213; x=1696254013; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4s1mdQKNja8rRVRNvpznVdJduDgGmg/7wDSFseU/UmI=; b=LrsLJ8qOr/6RMNQ8sKJV8ZVjL21ftj8GjZsA4COF5lrjbX1jCcGCCYRSzIsbXbKEVH Sm+N674AIfxi2JkgNTBnkeaU8RwZ1/1CqcDsBNlht45RxJau/ZWambmKD0Q4xUgAsrOa Oi548MQJUlGtcAMUi6bM7XdYWRKUQJjnpk5lBOYrqX368X8oMcM5yDoMBP+yl7RECoRa eEK0TSnbV6GeWWfZ1q2NFb9eVg7oXldnpkmqGsC3wWMx0d+R0LtUT0/XfFpTmi7fUAmR 5KOaDTYcwHq7IAFnx/0L2bXHdWNeOeVxweW709ZpNjmrlywT74EcNyGzNiFbPTc9YXMd tMLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695649213; x=1696254013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4s1mdQKNja8rRVRNvpznVdJduDgGmg/7wDSFseU/UmI=; b=KKwTuTwv59nu5QiTHLMUHHNtLVwi/lKOIyyAPj6eLPxHRh0mZmmUxxRcaH9ONzYjE+ fjMyTSccZwFSGM6pEZL27lLYutAYBm5Qi1M6mNpq+PyOHMhxk61qMSqIfwdF+5kSWmAL AozXJ/gb9Xh0L7eAF14GTrBgxtttCgg2j7llTSmmQfbqnMTok8Fi3Iu6zl6VYDG47xwR gWG9PwZPECp9LLlxASFHWM8BeGWYOZL4lrBc/ggjD7N4GVwTtLsJPiEl65pmtaTcmjJB z9uBwjoHGDi3qaqkr2IimI9eF1eW864AgAOpOkE+s7HDdaM3cyd3LOdZk2NgfWDZ7Yoo gyQQ== X-Gm-Message-State: AOJu0Yz2Q26iRbapdV33xdqu3vpX47Y2MSTtQ+4hghPXjhkqdOBTWN0x ayHRzLJrXxJLcWASgxshIRzLvA== X-Received: by 2002:a17:903:444:b0:1b6:6c32:59a8 with SMTP id iw4-20020a170903044400b001b66c3259a8mr4289356plb.36.1695649212949; Mon, 25 Sep 2023 06:40:12 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id p11-20020a170902eacb00b001c625d6ffccsm969433pld.129.2023.09.25.06.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 06:40:12 -0700 (PDT) From: Anup Patel To: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Shuah Khan Cc: Andrew Jones , Mayuresh Chitale , devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anup Patel Subject: [PATCH v2 9/9] KVM: riscv: selftests: Add condops extensions to get-reg-list test Date: Mon, 25 Sep 2023 19:08:59 +0530 Message-Id: <20230925133859.1735879-10-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230925133859.1735879-1-apatel@ventanamicro.com> References: <20230925133859.1735879-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UPPERCASE_50_75 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:40:54 -0700 (PDT) We have a new conditional operations related ISA extensions so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel --- .../selftests/kvm/riscv/get-reg-list.c | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 625118d53b74..cb1bb95b5df2 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -42,12 +42,14 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_SVINVAL: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_SVNAPOT: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_SVPBMT: + case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_XVENTANACONDOPS: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBA: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBB: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBS: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICBOM: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICBOZ: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICNTR: + case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICOND: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICSR: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZIFENCEI: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZIHINTPAUSE: @@ -355,12 +357,14 @@ static const char *isa_ext_id_to_str(__u64 id) KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), + KVM_ISA_EXT_ARR(XVENTANACONDOPS), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBS), KVM_ISA_EXT_ARR(ZICBOM), KVM_ISA_EXT_ARR(ZICBOZ), KVM_ISA_EXT_ARR(ZICNTR), + KVM_ISA_EXT_ARR(ZICOND), KVM_ISA_EXT_ARR(ZICSR), KVM_ISA_EXT_ARR(ZIFENCEI), KVM_ISA_EXT_ARR(ZIHINTPAUSE), @@ -632,6 +636,10 @@ static __u64 zicntr_regs[] = { KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICNTR, }; +static __u64 zicond_regs[] = { + KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICOND, +}; + static __u64 zicsr_regs[] = { KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZICSR, }; @@ -644,6 +652,10 @@ static __u64 zihpm_regs[] = { KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZIHPM, }; +static __u64 xventanacondops_regs[] = { + KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_XVENTANACONDOPS, +}; + static __u64 aia_regs[] = { KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_AIA | KVM_REG_RISCV_CSR_AIA_REG(siselect), KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_AIA | KVM_REG_RISCV_CSR_AIA_REG(iprio1), @@ -759,12 +771,16 @@ static __u64 fp_d_regs[] = { {"zbs", .feature = KVM_RISCV_ISA_EXT_ZBS, .regs = zbs_regs, .regs_n = ARRAY_SIZE(zbs_regs),} #define ZICNTR_REGS_SUBLIST \ {"zicntr", .feature = KVM_RISCV_ISA_EXT_ZICNTR, .regs = zicntr_regs, .regs_n = ARRAY_SIZE(zicntr_regs),} +#define ZICOND_REGS_SUBLIST \ + {"zicond", .feature = KVM_RISCV_ISA_EXT_ZICOND, .regs = zicond_regs, .regs_n = ARRAY_SIZE(zicond_regs),} #define ZICSR_REGS_SUBLIST \ {"zicsr", .feature = KVM_RISCV_ISA_EXT_ZICSR, .regs = zicsr_regs, .regs_n = ARRAY_SIZE(zicsr_regs),} #define ZIFENCEI_REGS_SUBLIST \ {"zifencei", .feature = KVM_RISCV_ISA_EXT_ZIFENCEI, .regs = zifencei_regs, .regs_n = ARRAY_SIZE(zifencei_regs),} #define ZIHPM_REGS_SUBLIST \ {"zihpm", .feature = KVM_RISCV_ISA_EXT_ZIHPM, .regs = zihpm_regs, .regs_n = ARRAY_SIZE(zihpm_regs),} +#define XVENTANACONDOPS_REGS_SUBLIST \ + {"xventanacondops", .feature = KVM_RISCV_ISA_EXT_XVENTANACONDOPS, .regs = xventanacondops_regs, .regs_n = ARRAY_SIZE(xventanacondops_regs),} #define AIA_REGS_SUBLIST \ {"aia", .feature = KVM_RISCV_ISA_EXT_SSAIA, .regs = aia_regs, .regs_n = ARRAY_SIZE(aia_regs),} #define SMSTATEEN_REGS_SUBLIST \ @@ -864,6 +880,14 @@ static struct vcpu_reg_list zicntr_config = { }, }; +static struct vcpu_reg_list zicond_config = { + .sublists = { + BASE_SUBLIST, + ZICOND_REGS_SUBLIST, + {0}, + }, +}; + static struct vcpu_reg_list zicsr_config = { .sublists = { BASE_SUBLIST, @@ -888,6 +912,14 @@ static struct vcpu_reg_list zihpm_config = { }, }; +static struct vcpu_reg_list xventanacondops_config = { + .sublists = { + BASE_SUBLIST, + XVENTANACONDOPS_REGS_SUBLIST, + {0}, + }, +}; + static struct vcpu_reg_list aia_config = { .sublists = { BASE_SUBLIST, @@ -932,9 +964,11 @@ struct vcpu_reg_list *vcpu_configs[] = { &zbb_config, &zbs_config, &zicntr_config, + &zicond_config, &zicsr_config, &zifencei_config, &zihpm_config, + &xventanacondops_config, &aia_config, &smstateen_config, &fp_f_config, -- 2.34.1