Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp276926lqr; Wed, 5 Jun 2024 06:02:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWqqdcVWnzX9eA5ySJKB3+5CFytVWs3TWS7ZzoFHpYS1NZlFcsqYN/85V7+Rm59ZekYmiJmUVRsTYJUYrVA8tXC9pDytUiNrMeEZro4g== X-Google-Smtp-Source: AGHT+IFbHGH/B1FD0fCg+MVuxoyZkbXsPIwDjDs0u5lk+dCHWCM3DMD1VaEjbZAMM2MnMicZESoB X-Received: by 2002:a05:620a:1109:b0:794:fb8f:5495 with SMTP id af79cd13be357-7952307164fmr418423585a.26.1717592529670; Wed, 05 Jun 2024 06:02:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717592529; cv=pass; d=google.com; s=arc-20160816; b=zLuQlXRHT5HQHcHsB+qbllbjlxvpaqv2EQDvlLmH1+L+/q41TffoEBXCfZfgOCzpH0 DzIHrAopbrfKyTKXm0rfCOJ/2J0o4WOf+5dCLlnliCntyHJWCOKG1T9ZwHYN3LDpGOKV 5ovmMmB02utkUybv0D08B21UiWaisfMSdele2mOdFf7T54EiAK/xigm0/fP0YL7UfRz6 o2pl/iA1erLUl6rBVfCOC9br1QqJEB10yjMOQVhzvnUpwJPLu+LkeFdmWXleA3llfG9Q H3bvDbRwT3Uf4MSjBHKVDgmzpN88pbWqTOlFEilDMOtG1z86d6FXR/1uqRBSKPrZG1WV o0WA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=s1s067gNcLroY85Io7X9j2HhTsy4/JNlR/TnSjjDyVA=; fh=cQdzNDI4lK8Qt/avtOGjx3WWYEgcHtqR//9EFOGbiys=; b=bFLQcsEN8aOGG7enDik1bc+pbzWUsUzMS35reemVi9cEaErOXU+PGVtlEBy2S4PTNz qeFoFLkMU608IZrbImU7h26rpPE2aPDJPkOakYNfRJTz2LYZSvu1QSWPj93Da7otj6b7 LSs4Ffit+Mrk3Tr4zYLNkOOusWVwCni7icMS/d/yMrBpw++AayYmq3VHja5DhC66DJ75 l2p7fA1SmjPgzSRdqX/qD1gmKLWuK3Z/VEoVhpI+gU3NnBTtXCDCl+j7NO19T5lr7pRI mq94FqJ8ZehvaFI2nONICAeo4V6WCpttssp92Yyz7x6Oi7G9bjQ9YMpnmnK8OALkE7am 0KNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=CBitWUsR; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-202571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-79527083a05si15147185a.167.2024.06.05.06.02.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:02:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=CBitWUsR; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-202571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4A7771C24602 for ; Wed, 5 Jun 2024 13:01:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06B66198A0B; Wed, 5 Jun 2024 12:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="CBitWUsR" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE2FB1B29CF for ; Wed, 5 Jun 2024 12:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589757; cv=none; b=INoNDvDZmqbWMPkm/dAwDomCSNqMmZzKOiH9cgjrSJOPhw6HOH4afb7RAxti+L7PrsFtn8P1G2pn7BzsOGZuas3w8m3HqNXGGESYK7yG2XmpJOtDNJVsAUrMbNPMj2pLj68wWvih/b3y8lmnGLI3sADrArcny+bavks81fw0Gbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589757; c=relaxed/simple; bh=jTQnCjAYiOnyg83RQMSJJfcBlJdwMJJeulbs10TuFN0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=kB37lgirXrfC87J7nyspUe55yDzM5Xpzg6FTS8iUaD3cbmRSTydlRQC1LJfhlV6qkCaU2bvSiSTSw0AtWhqjv5VtCszdJO54+gUbzLfci4zLSEnDMzQkJlfAtFiJMO61UnjfXcpAOY/MHp3EBILgSdxDRX8ZILI46b7CPh4DhdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=CBitWUsR; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-70260814b2dso757136b3a.1 for ; Wed, 05 Jun 2024 05:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1717589755; x=1718194555; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=s1s067gNcLroY85Io7X9j2HhTsy4/JNlR/TnSjjDyVA=; b=CBitWUsR33hB9HOopjBrDaBMynnxWxj9jsJptpQQEiMRYqcDTNOrzWqgU12T6nM/if Js42uzlCtjQ54l343H/Qt6ze3cksIGBBpN3P85Eu9VQg8F3J8rkPF7wr3jdciHklWuN7 LpqsnFHlIKWARFzMcHv95e3qd5iT1U88MdTD19Noi6zqiitE6BJY+DzB8FVAQL17neoe FHIV14Orizcq46ErCe3sEfnfdJwVLMbYHHHvcF/ZI684TX7hIvmosQNFCuTq0JQCKSPl gu6lrE2kQfKaf0IHv1QfA94jGI9yeJQQSKzFsOj87i1oolHhpvndPscP647SKDNs4ol1 qcwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717589755; x=1718194555; h=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=s1s067gNcLroY85Io7X9j2HhTsy4/JNlR/TnSjjDyVA=; b=d9QmCMOWPXcFRjWYaju9Ay9oAVem+l0E9Rs37rl8NO+eRiZ6EpjzjVBEeHpHnBNKiz W2OTQdOJOiu3d4Ix90WYLVsy86B3jVXtR9hTy43ZcEfjEd+wq2TFT1O6/Aed/KcewKCf j3vmQhR1hrg7KxQIVlKwKRFFIYHYyVH76gsOtFQn8CWC6+HvHOD7mTdoz/4g9nnMKJNU uj1spZqURYQiewyT1FKSuPPSmV6xvdL6AUfNy7+k5WmLiJk6yvncQ8ZFLKRDrn0A3if2 bmxvEaDDf5Yeyg5XG5V6vRKnBOpJUyKv4D8nHZ3aH5NcYC2CLrkDdRLC6wLBaRmxGbvm 4OfA== X-Gm-Message-State: AOJu0YxmuI633b5FCQutXWQ9vy2aaavjksSW5djQSTkYtPk3Wwgx/cJV Z6qfcxCJ5H2njKf2OAFjpUw2YZCYPLyzo3En+1tidVfQS2lw/fchrVfb2yb3g8ST67OluR/jFhX j3rfbWyyOxZFyrwA0WMZGQCAo1loy8qKcWq8R8XFoaIKFYXX2r+zqwerDu40Ld+y3XMo4lz51EB elYzMGFI68sDNcrBhng25P+Zyfs7Wo4SeQX1OT40pDQG0InTq3QQ26hQ== X-Received: by 2002:a05:6a00:6082:b0:702:5514:4cb8 with SMTP id d2e1a72fcca58-7027fba0d23mr6188351b3a.4.1717589754693; Wed, 05 Jun 2024 05:15:54 -0700 (PDT) Received: from hsinchu26.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703ee672fb3sm885379b3a.216.2024.06.05.05.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:15:54 -0700 (PDT) From: Yong-Xuan Wang To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org Cc: apatel@ventanamicro.com, alex@ghiti.fr, ajones@ventanamicro.com, greentime.hu@sifive.com, vincent.chen@sifive.com, Yong-Xuan Wang , Anup Patel , Atish Patra , Paolo Bonzini , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kselftest@vger.kernel.org Subject: [PATCH v5 4/4] KVM: riscv: selftests: Add Svade and Svadu Extension to get-reg-list test Date: Wed, 5 Jun 2024 20:15:10 +0800 Message-Id: <20240605121512.32083-5-yongxuan.wang@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240605121512.32083-1-yongxuan.wang@sifive.com> References: <20240605121512.32083-1-yongxuan.wang@sifive.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Update the get-reg-list test to test the Svade and Svadu Extensions are available for guest OS. Signed-off-by: Yong-Xuan Wang --- 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 222198dd6d04..1d32351ad55e 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -45,6 +45,8 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSAIA: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSCOFPMF: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSTC: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVADE: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVADU: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVINVAL: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVNAPOT: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVPBMT: @@ -411,6 +413,8 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(SSAIA), KVM_ISA_EXT_ARR(SSCOFPMF), KVM_ISA_EXT_ARR(SSTC), + KVM_ISA_EXT_ARR(SVADE), + KVM_ISA_EXT_ARR(SVADU), KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), @@ -935,6 +939,8 @@ KVM_ISA_EXT_SIMPLE_CONFIG(h, H); KVM_ISA_EXT_SUBLIST_CONFIG(smstateen, SMSTATEEN); KVM_ISA_EXT_SIMPLE_CONFIG(sscofpmf, SSCOFPMF); KVM_ISA_EXT_SIMPLE_CONFIG(sstc, SSTC); +KVM_ISA_EXT_SIMPLE_CONFIG(svade, SVADE); +KVM_ISA_EXT_SIMPLE_CONFIG(svadu, SVADU); KVM_ISA_EXT_SIMPLE_CONFIG(svinval, SVINVAL); KVM_ISA_EXT_SIMPLE_CONFIG(svnapot, SVNAPOT); KVM_ISA_EXT_SIMPLE_CONFIG(svpbmt, SVPBMT); @@ -991,6 +997,8 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_smstateen, &config_sscofpmf, &config_sstc, + &config_svade, + &config_svadu, &config_svinval, &config_svnapot, &config_svpbmt, -- 2.17.1