Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1445397rwd; Thu, 8 Jun 2023 18:55:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yvbCpDUiOZs1BHo/yzhMiL0JD6bqpOFTPESf/VAfRE2An/BhkgkFKFE6QuQL6Tj+3TQpE X-Received: by 2002:a05:6a20:7f87:b0:118:5d5a:f26f with SMTP id d7-20020a056a207f8700b001185d5af26fmr12008pzj.12.1686275728765; Thu, 08 Jun 2023 18:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686275728; cv=none; d=google.com; s=arc-20160816; b=wKhr4xtmSDq5e4D4yhSmeg95p1THzOy4xNIdSTV0Rqf7rr1lQiiPzJT5c3oZqOYYmk PXWfEQpWbO5cK6LZuaJ+EM4yQpl53chAOlarUS704wIH0kf9YMgSF3Xt68OILs72+l5D WXzdVCXNuHaY0yTxE1F1Xti5mNyUiYISGyVVlQY7pgHZJL4FNpj2hncGgtfKBmBfuST/ iNuKCi8602YY4tWwGkUdL6I1NH8o5YG/ISv7+06cVYBMyhlj7eCd01UKWHlVrhjt7S7L A5FjTLh3+Mhrmp9UPyUj9TGOnKCgJEl0quqCUb2em2GETHnCWiJWQQbDulCirSQyvmPL A/kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=twlI1LD4oryR8OR0rQu9NKOMo/NUVR/h5zjz7GVrnR8=; b=DZ5vI5A+9xTmv1ESTwHQpu7yBCUovyY8gZ0c7QyJC0XBw7/C8tgOkUp5l5swHH5kpf sbk42eHLlmTmz9tD4sjgN3XAz2Au0SNZgO96PodCpBx9Ue70Yv0aNFoNqXruj8IDZZ3k Hc3DdIS9knuxtkSNKqpr3ntA4ORmmjlhpw+rN5//F5ZgVw8poKxbFrp3yKoIiBsPVEy6 gzNdqgI3aMsWRNRg/SlYXmTA3xODilSFfgHONNKqi6oHuLo6VGGAyVn7lrxihVEPRf7y etpiIeD5qB5i+RnJfbdg4oCE2peMj3MZq/n2L54LHUJgdcEH7XTLs4IYmVQja1qWGle4 fDrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=XWHgzO75; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kz6-20020a170902f9c600b0019cec50618csi1855389plb.159.2023.06.08.18.55.15; Thu, 08 Jun 2023 18:55:28 -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=@gmail.com header.s=20221208 header.b=XWHgzO75; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237594AbjFIBVJ (ORCPT + 99 others); Thu, 8 Jun 2023 21:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbjFIBVH (ORCPT ); Thu, 8 Jun 2023 21:21:07 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E680319AC; Thu, 8 Jun 2023 18:21:02 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2568caabfbfso237048a91.3; Thu, 08 Jun 2023 18:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686273662; x=1688865662; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=twlI1LD4oryR8OR0rQu9NKOMo/NUVR/h5zjz7GVrnR8=; b=XWHgzO7540E60svSCzllKPcC2GCkvrzWjfew09EYySK6CIVycShnDFvaJ/ReMzuKop tJHDJHoJzt7aqoo+FkCB8sShxnEGHscNeCK2oQsmFiPbzo8s62H5qlR/zy2nXm4qubve BTdpAq1EDOPUR7fhJ/I4QUVF409qSoljmufyYAd+YmZ8/g5n5DwwYVDhbDpTdNlnJWRp rV2uao+FGjxkgbxjVwie8xF7SJrgN2OrRVfvddabb+yOj6iGDZR3KzEUPk5ryidqm01T 38Clp/syDd1nNbqlFunhiLBApy1OOhy4b7gYMi5u/IIC55njbLiA16sn0flz1M4SurH/ nriw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686273662; x=1688865662; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=twlI1LD4oryR8OR0rQu9NKOMo/NUVR/h5zjz7GVrnR8=; b=VDd54E6gks57/zZaxqkV/4EhYLkV+zy1Ywjf2ZGWrify/IH1dauO0sc63JUDF3zq7L +5hXPsPPW9aGASskypRvrppmZvMagfn+Eh8qGnXxKPCc0DpWNX9Bn0K1IIneybZYXJzC qWNqBJv33rsAHMWhaPxdZlOHMO8Alllljh3sftGlN2zHMBFlOtW60CvDwAHiTHQvk8Pk TER53FCnpWYLTuRc/iLyTXtGoIS0QgSpJ+qUwADARMPH33H/ReGAKOj0F+wmBXEV3g14 TTLG16XfvzLf26JaIOqx1Drf4YCSwARQVjqBHdhKNxQBFzQqUYmnOibl98q6ja4WqLIZ Z57A== X-Gm-Message-State: AC+VfDwE6c0UiEctTaOHWbqBml0RSeCFo+4IdH8Yranc109LhKV17Pq6 fo0wOMx+sxKAjcSsonEiGyicuypPFetHSjhetruvwnLVOUc= X-Received: by 2002:a17:90a:c783:b0:250:c4c1:882 with SMTP id gn3-20020a17090ac78300b00250c4c10882mr60804pjb.30.1686273662263; Thu, 08 Jun 2023 18:21:02 -0700 (PDT) MIME-Version: 1.0 References: <20230525-2bab5376987792eab73507ac@orel> <20230608-344953a953eeb63ef6c26fb8@orel> In-Reply-To: <20230608-344953a953eeb63ef6c26fb8@orel> From: Haibo Xu Date: Fri, 9 Jun 2023 09:20:50 +0800 Message-ID: Subject: Re: [PATCH v2 11/11] KVM: riscv: selftests: Add get-reg-list test To: Andrew Jones 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 8, 2023 at 5:58=E2=80=AFPM Andrew Jones wrote: > > On Thu, Jun 08, 2023 at 05:45:21PM +0800, Haibo Xu wrote: > > On Fri, May 26, 2023 at 1:18=E2=80=AFAM Andrew Jones wrote: > > > > > > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CORE | KVM_R= EG_RISCV_CORE_REG(mode), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(sstatus), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(sie), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(stvec), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(sscratch), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(sepc), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(scause), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(stval), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(sip), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_RISCV_CSR_REG(satp), > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_RE= G_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 | KV= M_RISCV_ISA_EXT_A, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_RISCV_ISA_EXT_C, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_RISCV_ISA_EXT_D, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_RISCV_ISA_EXT_F, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_RISCV_ISA_EXT_H, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_RISCV_ISA_EXT_I, > > > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KV= M_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 currentl= y. > > 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). > Sure, Will try to get it right for a 32-bit system. > Thanks, > drew