From patchwork Fri May 24 10:33:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong-Xuan Wang X-Patchwork-Id: 1938918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=YUhuFOcm; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=YryYessQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vm1bw04Nbz1ynR for ; Fri, 24 May 2024 20:33:48 +1000 (AEST) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=ofJeVnlrkhTADn/ng2+z+j7f2yrRmLgT0Pm1Jr7RhJQ=; b=YUhuFOcmPB4Cyh q5omlbD0FtQPCdBuT5FEzKRmOZZb1L9br0s0uVFdeqMolq8DnTnZxdxTdJnHlt9v6s7Aqgj4GLGXt ooGVcahLLnRCtg4g8m+Iu/zLW1N+Va3s+mIwdCk20lkl6GJL0h2bNuaA2/5+QtqaWOMCQuDnwhyku k7FaLv7rKGLoS6ZKLfGlm8rV9EbEDVVy/rBCZu6Add8KDML9gQthgCcmyt/99u1ivn0xxVLgXTjHB aOo1JknjZZGi2ismAgfh7qXltRfDilr8g1sy0LWB9Z6IZGRG9e1J5oJHx9gaJSpusLr5bt87PDfsM 95fqg0HWFuybKlWIo1PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sASF8-00000008gJ6-24hj; Fri, 24 May 2024 10:33:46 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sASF3-00000008gEI-1keq for kvm-riscv@lists.infradead.org; Fri, 24 May 2024 10:33:43 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-681907af4e7so587816a12.1 for ; Fri, 24 May 2024 03:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1716546821; x=1717151621; darn=lists.infradead.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=ymkmfLUFinfhQ3+TDmLUw1ksts6DHkemJ1yTbP87LC0=; b=YryYessQPN9MrDHRKNglrYpW+EzbMrpR5YoFI3+sEFlPcQR0sWfEHtoIs0r1Me+ZLh F8ESMXQ0oSPawwnc3Oj7e83FmV8iFXzfyeEFhMm+mUKB2/uDUCojrUoN1gmTNfAej9k0 mZGgTj2J0WWAeEy/xGCbucc67/TNTll7xyfRgKq1kT/y78NWwuBxYqriTl3OCJ4vYYE5 qsxyMjwR1vk559NgUGIxmoJoTuvzyByvYP48i4a4nYIyRuXR6X0/QLj2hJH8m3tye9ww +ooFD3cjamSjK7Wcv+qQ/MDNIZl5vWzt4h+tyV51B7rv2JHq/db33nkUMNecn6J0yszE pgTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716546821; x=1717151621; 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=ymkmfLUFinfhQ3+TDmLUw1ksts6DHkemJ1yTbP87LC0=; b=wJ/JocVAT4ycXIGTOAlSLSPTegH8YiEmdo88mrKsUNiv10+KDmqYXxry3L1bFkVY5z 8Mz4VsEMilB8FFSfZg/8bF8+dOYbWQYUCJKMCTHtddjR5c2V2+Jop0qsB+tkQ28GubNt aw/Wdt3sKnCoX2mogMIj2jc2tWLwwo1bmN0hUz7jmnw+Ty+tKklXQw/jUXMK5Rf5YgAy QK46GxYC2Qj29LWa29epovJv5OGAuhd4ZFK/oncq+g+WGN5mOTn0EkRMKnLww0utXwFN 21baykXqxTABfXlIVHad2pf4Cqv2USr33PjJB597llmfP32BK/4+ltB8GFjnROZouxXL HhlQ== X-Forwarded-Encrypted: i=1; AJvYcCUsRl+IzM/ku87WI6ISANDyhLGATChvpuc/Eqh0S6kQxz1TkZlKGOymSbhT+sM1sZmfO+mm8yk3yAKQaQ4KQbWQhGhrv+0F7viw6okIHA== X-Gm-Message-State: AOJu0Yxec9hmqkqroZeIVgc+YLTBF+/ef9Oi7ccvJ+2FYcax2e0eSz4U i85jVNFxUg1IXzoS1bNI8zM2ZlCHN96seAGnf+EIwxKdP3mqtJLkQpIQl0/j/kU= X-Google-Smtp-Source: AGHT+IHxFW2gDsXCi1JB6IcnARVviEQ8KpdJHHbgbAeBuxdOzZ+lkUts0NLoKaacIMyi2TPJR7Frng== X-Received: by 2002:a05:6a20:2d14:b0:1b0:9b7:bbe3 with SMTP id adf61e73a8af0-1b212b7b0f1mr2711881637.0.1716546820772; Fri, 24 May 2024 03:33:40 -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 d9443c01a7336-1f44c756996sm10936625ad.8.2024.05.24.03.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 03:33:40 -0700 (PDT) From: Yong-Xuan Wang To: linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org Cc: greentime.hu@sifive.com, vincent.chen@sifive.com, cleger@rivosinc.com, alex@ghiti.fr, Yong-Xuan Wang , Anup Patel , Atish Patra , Paolo Bonzini , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 5/5] KVM: riscv: selftests: Add Svadu Extension to get-reg-list testt Date: Fri, 24 May 2024 18:33:05 +0800 Message-Id: <20240524103307.2684-6-yongxuan.wang@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240524103307.2684-1-yongxuan.wang@sifive.com> References: <20240524103307.2684-1-yongxuan.wang@sifive.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_033341_555165_4CC70168 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.6 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Update the get-reg-list test to test the Svadu Extension is available for guest OS. Signed-off-by: Yong-Xuan Wang --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 ++++ 1 file changed, 4 insertions(+) Content analysis details: (0.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:52f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.8 UPPERCASE_50_75 message body is 50-75% uppercase X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Update the get-reg-list test to test the Svadu Extension is available for guest OS. Signed-off-by: Yong-Xuan Wang 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 b882b7b9b785..3e71b7e40dbf 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -44,6 +44,7 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SMSTATEEN: 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_SSTC: + 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: @@ -409,6 +410,7 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(SMSTATEEN), KVM_ISA_EXT_ARR(SSAIA), KVM_ISA_EXT_ARR(SSTC), + KVM_ISA_EXT_ARR(SVADU), KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), @@ -932,6 +934,7 @@ KVM_ISA_EXT_SUBLIST_CONFIG(fp_d, FP_D); KVM_ISA_EXT_SIMPLE_CONFIG(h, H); KVM_ISA_EXT_SUBLIST_CONFIG(smstateen, SMSTATEEN); KVM_ISA_EXT_SIMPLE_CONFIG(sstc, SSTC); +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); @@ -987,6 +990,7 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_h, &config_smstateen, &config_sstc, + &config_svadu, &config_svinval, &config_svnapot, &config_svpbmt,