From patchwork Tue Nov 28 14:53:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 170856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp4017124vqx; Tue, 28 Nov 2023 07:41:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgRINVzBdS6OtkaeHotSCBtlZobTrpwu37Iv2AHKT7je0JftsX7ECXgQBKlfuAhCQ1U4uz X-Received: by 2002:a05:6a00:1d01:b0:6be:4228:698b with SMTP id a1-20020a056a001d0100b006be4228698bmr17730112pfx.20.1701186117994; Tue, 28 Nov 2023 07:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701186117; cv=none; d=google.com; s=arc-20160816; b=Ly8DrRFkWvYZhWCuc9REfUTT9mCcenuIMPNBUNMzGXg/W897Seis47cdfEi54mefzy f0BrQYkKHHdalhPlANKckj0L3WFgxCv87oZYGAKAK6LmKDMH5JsJsiHXMZmHxn8IgtPZ tIzO744XhZX6wRVfBzSxcomdhhEfmgHjhQayad1KwKmLTs7GbV7219esL4BRbPYUGlVa MoRHHBS4wCvvwNRRib3YQPsUGGDEQLylXwzMCrgRPw2uBdojGlutym0n+17fC28vQpoV NfeCP2hLzsYJkIgXlKOohsJ820K7cI6gWuE0YbgrULT0ZaRdeOSltZ0X55GWqGhGuRy5 lMoA== 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=dwaKI1lgANZQjTOA+BSUck4M/d+5iVp8xCEzRTmcPWo=; fh=+jOfndtgkMGLet8rfMfGblttrnHjUS2P+rQOE/pONQo=; b=NxQThwwsAFfXnQIh6DvfGaTzssoTkqNvPI6L6PjL09sQI5EYrIHYkjBaVXBUuRCMO8 yXNb7P+DfIcAfYK2/IseBwHIYa4kzrJ4J9VeaWFfS7kAeaW6Pr/GM/d6f+TRIdgCF1W2 ftzX5btRl100gBvZBkSudusy//CW8+6C7ahLCLs1SjUQqmOpKR58ovuZIclcBsPhQElb Tbi7Iax1kPKJT5IuIRVLlBWeLnGxQW5lWyiU14fKfLxO0rqKKeWqJRkQOVb7cVzY/KLx IMNZeCscH2Sx013ctCvdscWBlIVr1+IiVtO8N7fzslxBC1puLEHNguso45rYDXyFVCs6 MWcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=QUx7BnEG; 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 l3-20020a63ba43000000b005c1cd597808si12962116pgu.692.2023.11.28.07.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 07:41:57 -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=QUx7BnEG; 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 19F16807B497; Tue, 28 Nov 2023 07:41:09 -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 S1346973AbjK1PlA (ORCPT + 99 others); Tue, 28 Nov 2023 10:41:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346549AbjK1OzR (ORCPT ); Tue, 28 Nov 2023 09:55:17 -0500 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 3429019A3 for ; Tue, 28 Nov 2023 06:55:06 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cfc985c92dso20796445ad.0 for ; Tue, 28 Nov 2023 06:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1701183305; x=1701788105; 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=dwaKI1lgANZQjTOA+BSUck4M/d+5iVp8xCEzRTmcPWo=; b=QUx7BnEGbwMAVcJxQNaNG9NsHM1hUy6COEnkx3pc6GUcocnzt+VJMbUhdPid+9psRm niBTGRsJrjrGRij3wQkIMoBufaJuR6SIlKB/uFgqRYaHbUOT4u1KWalMlzzV5yvFgj1Z LQmirJ8O81+QilLcAeJ2/erJT8hJBt/xgF1B+iNVQ+GYtx41YaOdQhkqfhTXNIlE78VZ joJFh02I0Y07RQtRLXmhZ+tBesBUORtQ54XMSsvsKLn27ONSqBBr0DhsZKN826UWbk51 E4d76SxH1YCpQ/Wdn6efgR6kcQcCBw+5G+cdZV76cbwEcaM3AjW49QEDkvDIVpAM/B8h VJHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701183305; x=1701788105; 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=dwaKI1lgANZQjTOA+BSUck4M/d+5iVp8xCEzRTmcPWo=; b=kx+tnXKuRcRou1kUiYoOZBOxALM5z4fj+mXQi9yu9qJFrCbKQRQDWmfzBXYovMcROV BqO9ki29TYymEmJD74jDExx41WYJO9oAPA0pxJbRs1Zw4xjfM45xpXc3Uum2oLMV/CUI R9EoozU0iEgeodTByWUOCYfTTcgWQ8AspVXE4nyw5M+hMXsYNSwNpWZG1nAnvzyZZ3mI sHjVdLhHQeovhvbq+VgNl7DxhQy/inaJD9kR46bWhAK+lM/7gYOafpVWVeHZDYvE0rjb RodVBdrW+C6cZTw50ktO8KUTAI7YGfjwzTT/ro0cMJdiWXVqfB8GzJpcwLef+BU6Bcsp 7pEw== X-Gm-Message-State: AOJu0YyR9W6FI+UnMCGau4kxdJD5b4Q/1v2CdjT2ywdEj/Zs0Kn6fL7B gqqJClrK0eJV9MT3cP18iSgpJg== X-Received: by 2002:a17:902:db07:b0:1cf:c37f:7160 with SMTP id m7-20020a170902db0700b001cfc37f7160mr8891565plx.63.1701183305589; Tue, 28 Nov 2023 06:55:05 -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.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 06:55:05 -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 11/15] KVM: riscv: selftests: Add Zihintntl extension to get-reg-list test Date: Tue, 28 Nov 2023 20:23:53 +0530 Message-Id: <20231128145357.413321-12-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 07:41:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783822934586856924 X-GMAIL-MSGID: 1783822934586856924 The KVM RISC-V allows Zihintntl extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 4af0f9a750e8..e1d43cc9da16 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -57,6 +57,7 @@ bool filter_reg(__u64 reg) 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_ZIHINTNTL: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZIHINTPAUSE: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZIHPM: case KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_ZKND: @@ -397,6 +398,7 @@ static const char *isa_ext_id_to_str(const char *prefix, __u64 id) KVM_ISA_EXT_ARR(ZICOND), KVM_ISA_EXT_ARR(ZICSR), KVM_ISA_EXT_ARR(ZIFENCEI), + KVM_ISA_EXT_ARR(ZIHINTNTL), KVM_ISA_EXT_ARR(ZIHINTPAUSE), KVM_ISA_EXT_ARR(ZIHPM), KVM_ISA_EXT_ARR(ZKND), @@ -798,6 +800,7 @@ KVM_ISA_EXT_SIMPLE_CONFIG(zicntr, ZICNTR); KVM_ISA_EXT_SIMPLE_CONFIG(zicond, ZICOND); KVM_ISA_EXT_SIMPLE_CONFIG(zicsr, ZICSR); KVM_ISA_EXT_SIMPLE_CONFIG(zifencei, ZIFENCEI); +KVM_ISA_EXT_SIMPLE_CONFIG(zihintntl, ZIHINTNTL); KVM_ISA_EXT_SIMPLE_CONFIG(zihintpause, ZIHINTPAUSE); KVM_ISA_EXT_SIMPLE_CONFIG(zihpm, ZIHPM); KVM_ISA_EXT_SIMPLE_CONFIG(zknd, ZKND); @@ -843,6 +846,7 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_zicond, &config_zicsr, &config_zifencei, + &config_zihintntl, &config_zihintpause, &config_zihpm, &config_zknd,