From patchwork Tue Nov 28 14:53:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 170843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3980129vqx; Tue, 28 Nov 2023 06:56:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWOAZJVHEakY7EbuSithTAh6XTolM9ygaoXMddIFxZL6pydBV/LBxtAkEnPlQnWYRRHS94 X-Received: by 2002:a05:6808:171b:b0:3b6:b071:3079 with SMTP id bc27-20020a056808171b00b003b6b0713079mr19133577oib.27.1701183386643; Tue, 28 Nov 2023 06:56:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701183386; cv=none; d=google.com; s=arc-20160816; b=u8FhNiTyZxTWU0EHipvs3lwNo/z9WqIdo4KQLu+stYd+mVt6t8L2qtxkxfdoRe1gQq J3brLIq0CQKUL4+QVE+dRC7y4mW0Sgt0M7G7D+1XM6wyF/62D1599KXl1zHdR5iXisbV AgvxfEZkl5uUGd68FCMbd8g8KiPfhQC1ZljBm8UR7CRtDb7CzPuQ/y9UxoG5IRpLe79T TOeVOrSNVAv/n97ldMeoIhNpY+dT8BotyYzFmN/p/Ca0RL2x4FLs6/uoE1R4Ib8Y8CLm I4AIv/WoCX71CoynxDqJRlhMLNJ/WBP0w4/jdAXQZ8mYlhCnACiyabQTb40WcSdhLRJl nFHQ== 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=Hci+9UDHQawot6/zMSxnmVJawqM8CfBCCGrmHWBS6oU=; fh=+jOfndtgkMGLet8rfMfGblttrnHjUS2P+rQOE/pONQo=; b=VN/z0VkKI0IHCHnGisidWyVAwjkCkCmdfIEMw19JeSXW+5HdCf4Rin+A9QEE0kHL6L DIV5FE/Bt/M7sl8eoCXmZE/JPsKXSEulw6MJl4Pq9W1HkQx2gGv5BNUoEvl1XKVM0qom 5ZhPciJraFhFAYAfScTlRTua6gyfmQCLjwMEIbn+sph2g7vfeBZxJoJXDp7FKK34WyNw hyXb+7fT1x/0fWIna6KB3exZECCLDFrX+Iwe6VmLrfGzufPZlxijV2cRZ4lhAzck6a5V q4Q35Z8wVfH8GI+00eZxnOwEtg79uHRmuG6p4DxEzLQ7vNtXz8eEI2AnumXU51KBibzm xV2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=TPayRs9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 4-20020a630a04000000b005c14fc66ccasi11973046pgk.370.2023.11.28.06.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 06:56:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=TPayRs9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id F2A898077A4E; Tue, 28 Nov 2023 06:56:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346457AbjK1Oza (ORCPT + 99 others); Tue, 28 Nov 2023 09:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346450AbjK1OzD (ORCPT ); Tue, 28 Nov 2023 09:55:03 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E1E211F for ; Tue, 28 Nov 2023 06:54:55 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1d00689f5c8so3346725ad.3 for ; Tue, 28 Nov 2023 06:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1701183295; x=1701788095; 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=Hci+9UDHQawot6/zMSxnmVJawqM8CfBCCGrmHWBS6oU=; b=TPayRs9whr3uuBaSuUDfkKGmADZDwNbp1WsrOGt+sBJEPDcZX20OkJDROXx6TGhDFb GCTh2QDhTznTXxDFo8xTeF253YzQIXaLsEBdz7hTlX6Fz87og2Bnu2KHyIsQdO0VE5cd hCIGVVunV2bYNFA64VEkhPiO10ISP8HvwZiB2DQbS7GXwpemN5RM6fqTLAnhBzZZn992 tIsEhWxCkLjtKNeqJtrnREYhPG5TluaCLDFn+kkiU/0GTZheA5AnB68Lvslo/Wvq4gxG h49nA5D0OBNtMd6aN3pQUM51QCuQXrHVMNhaGlEv1+x/RFkSjrgNr6tVK7vVgc/n9y+t udMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701183295; x=1701788095; 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=Hci+9UDHQawot6/zMSxnmVJawqM8CfBCCGrmHWBS6oU=; b=rF+NKbntQmOjEs4RTolN32u4Jwz6oR34kQdaD9QYJUwVxHsrQ/G0m5shcCAneNK9V1 9hFtUcCSh5kPg8BqoGjNWtAgU1h09gh35IqSRhrY0c+Xyf62eQqlOSdHRd6/U0AEF39I l6BSVEr9iuxXICQt7ew31KPqlgqETIY1ruuw8HDO+GzY+319DQJJkq2kNVILMnchHoan ylW3wJ6ENTpC9tE7e/hGkgIvwGZzDhCh9TKcbS41g9ZfKcv5rHyv+YVpspmpMPvIDKH3 q+kQQAfzp9Pg6AVxWQjP2pEtKhbm1Yz1SkQs8HmHbS7Xy5BSvx4sQ1rc3r5YOBpDYFy0 NT8A== X-Gm-Message-State: AOJu0Yx43eMtD85IY87EYWm3DcbCHgBvJT0ufurweytH7XCoMLjDfLlK bbnjReiTqeXMZZistB6hwgRlpg== X-Received: by 2002:a17:902:e5c7:b0:1cf:a4e8:d2be with SMTP id u7-20020a170902e5c700b001cfa4e8d2bemr18008232plf.12.1701183295332; Tue, 28 Nov 2023 06:54:55 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id u11-20020a170902e80b00b001bf11cf2e21sm10281552plg.210.2023.11.28.06.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 06:54:55 -0800 (PST) From: Anup Patel To: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Shuah Khan Cc: Anup Patel , Andrew Jones , 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 09/15] KVM: riscv: selftests: Add Zfh[min] extensions to get-reg-list test Date: Tue, 28 Nov 2023 20:23:51 +0530 Message-Id: <20231128145357.413321-10-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231128145357.413321-1-apatel@ventanamicro.com> References: <20231128145357.413321-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 28 Nov 2023 06:56:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783820070423260887 X-GMAIL-MSGID: 1783820070423260887 The KVM RISC-V allows Zfh[min] extensions for Guest/VM so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 04ff8836c474..4af0f9a750e8 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -49,6 +49,8 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBKC: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBKX: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZBS: + case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZFH: + case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZFHMIN: 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: @@ -387,6 +389,8 @@ static const char *isa_ext_id_to_str(const char *prefix, __u64 id) KVM_ISA_EXT_ARR(ZBKC), KVM_ISA_EXT_ARR(ZBKX), KVM_ISA_EXT_ARR(ZBS), + KVM_ISA_EXT_ARR(ZFH), + KVM_ISA_EXT_ARR(ZFHMIN), KVM_ISA_EXT_ARR(ZICBOM), KVM_ISA_EXT_ARR(ZICBOZ), KVM_ISA_EXT_ARR(ZICNTR), @@ -786,6 +790,8 @@ KVM_ISA_EXT_SIMPLE_CONFIG(zbkb, ZBKB); KVM_ISA_EXT_SIMPLE_CONFIG(zbkc, ZBKC); KVM_ISA_EXT_SIMPLE_CONFIG(zbkx, ZBKX); KVM_ISA_EXT_SIMPLE_CONFIG(zbs, ZBS); +KVM_ISA_EXT_SIMPLE_CONFIG(zfh, ZFH); +KVM_ISA_EXT_SIMPLE_CONFIG(zfhmin, ZFHMIN); KVM_ISA_EXT_SUBLIST_CONFIG(zicbom, ZICBOM); KVM_ISA_EXT_SUBLIST_CONFIG(zicboz, ZICBOZ); KVM_ISA_EXT_SIMPLE_CONFIG(zicntr, ZICNTR); @@ -829,6 +835,8 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_zbkc, &config_zbkx, &config_zbs, + &config_zfh, + &config_zfhmin, &config_zicbom, &config_zicboz, &config_zicntr,