Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp461221rwd; Thu, 8 Jun 2023 03:18:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/hRkpqHsYkdgk/gvLvE+ehglrIewwMFtCtvgUfvymPJ/sgCsS70/XlgYwDsRVybY0tXeb X-Received: by 2002:a17:902:ea0e:b0:1b0:3576:c2a9 with SMTP id s14-20020a170902ea0e00b001b03576c2a9mr4440844plg.33.1686219514558; Thu, 08 Jun 2023 03:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686219514; cv=none; d=google.com; s=arc-20160816; b=vUBDrDH6/UtBXDb/elVDwK+JLziqlTOVfTuGhAPXEMrUUV7FrEHSR5ESFgnwxXwefq EuZApvZ9Ga3cTuymY18C/KwMOJ9oDYqxpVCGPmf0hZLUaOWw8ZL6aABCPR3E3NIY7Ex1 4yF2jKhCIl8GjeHhB3TIfM5tYYA9R2di3n1Vc11vTJU9fYxVVC674pTPpz2aJ4fLs0XM HKPeYaiJ3DuPQBgJTiIP63mou+0vgFLA9dRWUUPmECQyVllrcWrpCpeUTIQ+QaqKSmPn AqEfY5FjJd2QH8evLdOR16oKcVA8Pmlp7T/s0kNRNu3rA+I002Xo4lUWGE+Rvh9QdjM4 F/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bro8SCdRCjEHWuDcBtldZHsndfar0M9rwEdZ8SQ0W0s=; b=Jak5y0Qe5St70wBWAYqQhaQyM77YfrYPjLpVfaNogpsuMxq5+XIBMXVOdgeWMwcXDP gtwWmqz0w3iO2onz7l10OvvQrWwP4i6KILyDJbZuF4sm3pS/wkhaFZnSc3DpsFpO0jc/ 7RkfWY++K7vUoXnz6nuuD4QLgNSLsO8kVNyD0PmJY0iZZpSSKygg5sY8OoPK0sRqFUjr lJ/tCqom5qlcBCncmJycT+Ww28CNfILd035cfcPEZ9bSEQTMFlp7dvaGXXVw7VCl8hix MJiYOcOHxiR+WqoCZffshllKAHN6B5pzk2phiXwiVmqiZD+dOnsKvN2O3cPk1EwbONbY f/PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=DWLlXBMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a170902ee8a00b001b0191881efsi884872pld.37.2023.06.08.03.18.22; Thu, 08 Jun 2023 03:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=DWLlXBMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235696AbjFHJ6z (ORCPT + 99 others); Thu, 8 Jun 2023 05:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235603AbjFHJ6w (ORCPT ); Thu, 8 Jun 2023 05:58:52 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A10652709 for ; Thu, 8 Jun 2023 02:58:50 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30af20f5f67so421481f8f.1 for ; Thu, 08 Jun 2023 02:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1686218329; x=1688810329; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=bro8SCdRCjEHWuDcBtldZHsndfar0M9rwEdZ8SQ0W0s=; b=DWLlXBMjR+In9QMk6WByU+4r6ZJwRxIdZLTZafSYiCKOJbbbT6swcxcbDLzxBWXjSp 1fbhQV7xgyvNNKARmYmQiulH1nZx4WLvUTDj3K4StImn2hgIxDj2+ikZyPIKdWisMOTf POkUvZLouPzWG0TFB+pG8Fqpf4v308cP9MheL82rSXAkIQHV8FTqswIFUo3ofKEZH1T5 gBAYnPnURVTOhHfQfMReB4ybwIfvFPWb9VgzTP9BzQ4nEZKp69qw8Fh1mVAeJnQ4O6Qb hvdyiWTomMIhVCmxq/xcYY3sZSRGDpAgFxYDyLLQmROw3quJagxDYH4kZcjPI1PfZRLY vJdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686218329; x=1688810329; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bro8SCdRCjEHWuDcBtldZHsndfar0M9rwEdZ8SQ0W0s=; b=Nb7d54hFuOPN1V7IG/gOpXXpmGvA6cmI0gTppaVYoyBJZ5UUI3c3i4Dbnb8LwxqgQc S0UQVcZMnI0SPVzBzgQkSxfqdh9x9snoN4r24Swq8LTYwl92/z6jKk82Nrk5uPOFVTe8 0gn/y7LcCHbMu+yJ0weA/RYvzD0qeNkdR4gf2DUK4b87LwPStdghGfUYQpLPOZ0GQIXi QlbEIVQdoJTpJcKwTwMGn8+TFymotbKLmYT8oruMnyQZ3UnCsFDr+/MgLlyB1MQjN4iu 5B5IOTDEv1mir46V7IzQAO9gZ9tQDKMRgKt1Ld8vAOwtpBGngNVxfLeEkLGPPRJdZuLK C8Rg== X-Gm-Message-State: AC+VfDyYZZnGY9Yps/mtTQZEiYIvommH1OBeI79MGVecChTmsSvi6RHC 3zc88f4A8UseOitPpIlL4KEEOw== X-Received: by 2002:a5d:6550:0:b0:30a:9014:838d with SMTP id z16-20020a5d6550000000b0030a9014838dmr6419901wrv.11.1686218329062; Thu, 08 Jun 2023 02:58:49 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id q12-20020a05600000cc00b002ff2c39d072sm1065586wrx.104.2023.06.08.02.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 02:58:48 -0700 (PDT) Date: Thu, 8 Jun 2023 11:58:47 +0200 From: Andrew Jones To: Haibo Xu Cc: Haibo Xu , maz@kernel.org, oliver.upton@linux.dev, seanjc@google.com, Paolo Bonzini , Jonathan Corbet , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Shuah Khan , James Morse , Suzuki K Poulose , Zenghui Yu , David Matlack , Ben Gardon , Vipin Sharma , Colton Lewis , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 11/11] KVM: riscv: selftests: Add get-reg-list test Message-ID: <20230608-344953a953eeb63ef6c26fb8@orel> References: <20230525-2bab5376987792eab73507ac@orel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 08, 2023 at 05:45:21PM +0800, Haibo Xu wrote: > On Fri, May 26, 2023 at 1:18 AM Andrew Jones wrote: > > > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CORE | KVM_REG_RISCV_CORE_REG(mode), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(sstatus), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(sie), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(stvec), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(sscratch), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(sepc), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(scause), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(stval), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(sip), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(satp), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RISCV_CSR_REG(scounteren), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_TIMER | KVM_REG_RISCV_TIMER_REG(frequency), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_TIMER | KVM_REG_RISCV_TIMER_REG(time), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_TIMER | KVM_REG_RISCV_TIMER_REG(compare), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_TIMER | KVM_REG_RISCV_TIMER_REG(state), > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_A, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_C, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_D, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_F, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_H, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_I, > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RISCV_ISA_EXT_M, > > > > I think all the above should have the size KVM_REG_SIZE_ULONG. Please also > > test with a 32-bit host. > > > > Hi Andrew, > > Just noticed the RISC-V 32-bit kvm selftests was not supported currently. Oh, right. > Even though I tried to remove the below check for 32-bit, there were > still many warning and error messages during compiling. > It seems 32-bit KVM selftests was not supported either for ARM/x86. Do > we have a plan to support it on risc-v? No plan and, if there was, it would be super low priority. So for stuff like using KVM_REG_SIZE_ULONG, we'll just have to try and get it right without testing. If somebody adds 32-bit support to these tests someday, then, hopefully, it'll just work (I'm allowed one overly optimistic comment per day). Thanks, drew