Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp445856rwd; Thu, 8 Jun 2023 03:05:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x1arZj2rclKkbpqNKVRJBgaMFc/5wgt32A1sXM2u3Etgn5I+L/ohMoxH7QTLsqVLJKKN8 X-Received: by 2002:a17:903:486:b0:1af:9b8a:9c79 with SMTP id jj6-20020a170903048600b001af9b8a9c79mr8342958plb.34.1686218730828; Thu, 08 Jun 2023 03:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686218730; cv=none; d=google.com; s=arc-20160816; b=CTpO/zL1B8YEt06PRk8PCeTizs6zL55OMdUUp7NzZ46MTLBWsG+2jpGnHn3LDBxDSs MYXFvB9QJX3gEd6KC9pbZ+jVRzI9OR5Y+TOl0jSxCXL02UfgZ/8GUea0dQ+OhDN+z/Ie cEZnWUFSVZxsfwXdhThKpMdKtvak1sz1y7QxYJUx1KXA2kCyuse9X/7Uq+TGrric0+zV KCnayAZ4HFwf71v1hzEMovKuE+QjBx0lPN9sDGZd4yQO7cb9l7WS3FpOIg7FPgabib3P F9WqznZxoqgFPffgcWbCwfX9Zjd1mqAdql9eYRrML6V4rkYxVGpORlZfA7eFDyJQ1fKQ eHpA== 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=KWfXcI9qpNRXyZ49c1qVkzQX/sqIlGyUNHOIKGAzDQA=; b=G7Deqg2Xv6eHw7/q1/WAbxW5pJFWhUNDdSOzyTgAPtP1iOCdtyjte+xCd1ssCuDcka 42DlmcoxeO+QAvlFOutR5KuRWXJgL54W/eibxBhrYi0dzVUzHvx7sa6A+svC2sJ7Ro3o QWhxp343fV1JcgMfuHBd2S5HpmUyOOKsqR5QFBFGmydMK2Is1m+R8wPISMA4wLyQZmCM Kg0YSKu/7ScJXwWX7EPmz14t12js3Y7M6JgkcRna1AyQK4FJlTFVz8Zouylr3l0UUDHv 7fM+kWxWUxuGiWiIPxU8nFg/MDD4nVOolv6iD2daYQAJ0YMyIsIHMnnOHNOE8nZfPjKt tUYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OoOYd2Yl; 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 u10-20020a170902b28a00b001ae1bb70a41si841896plr.168.2023.06.08.03.05.18; Thu, 08 Jun 2023 03:05:30 -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=OoOYd2Yl; 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 S235607AbjFHJpv (ORCPT + 99 others); Thu, 8 Jun 2023 05:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235383AbjFHJps (ORCPT ); Thu, 8 Jun 2023 05:45:48 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8A94213C; Thu, 8 Jun 2023 02:45:33 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-19f268b1d83so334794fac.1; Thu, 08 Jun 2023 02:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686217533; x=1688809533; 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=KWfXcI9qpNRXyZ49c1qVkzQX/sqIlGyUNHOIKGAzDQA=; b=OoOYd2Yl2fvO4CeoY9SXHmrdO/GnjLe13sWCrJ7lGe1yhDuyXVDlqo0aUAKF0FKt9F uEbaKxjDxSqxqK3VGqMeVp/mo6E9VAG1KNWCB0Y1+PWB/moUVnUjS1NHX3MLj8gLWZ6z SsE9OQSfsUMJoyg9sQB2EtUigZho4LxaKSjdF4sCvz6wVdlD4AGj9a0TH/W8c5cYCVQP 4kTNx9yq3tD7FM3+jK+lGWxjLs98WKyMsVCvksXQYHXH/ArNdQ0oQUlPlOSpbl04LXv5 8Urqn++vTFktCKLCVxhFq0WA7NQuJmzpA31w40ViBGkfOQ8lMcSiN/BxLM8WpSOTLZL5 6DiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686217533; x=1688809533; 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=KWfXcI9qpNRXyZ49c1qVkzQX/sqIlGyUNHOIKGAzDQA=; b=VnAMV3JHdzpAQMJU6260SpIBIlG2aajNoebrUXeiqLhYiYOucXyggdTiFxTg2vR7zc 77fVkRxt9YzSl4ceYPbWGG08WEqi4uVndWkXrDJWz9tLoOZ1Rxu9KhXHqZbj8VLy/HzK nLlY6ZhLwO1nGRQNS8WTmPgMl5OVwVKabERFa8MMB3ktIg8goJMsQVaOi7Wex+wGwOV4 1EgAk5RLHwgNHXiUNNy1CGm3LE2edQhjOE7sdiVBh4PIyf8qx9X1sonWGjfD7B1j6lu6 1l2vuFNuph/lyabQMdjy/YrE1CUPfj6uXUR0CEzvT1q0OURy6SEyuLN3JNLUK9XDKo4Q CneA== X-Gm-Message-State: AC+VfDzeBamlQKYWvt63YKUW/+DcGcjTj65x8yDAM703QRi2vsuIjseX f6mfjApxLDEdd2XHFYG6AEjF5JzIXVBbNsbb+Mo= X-Received: by 2002:a05:6808:315:b0:39a:62f7:9463 with SMTP id i21-20020a056808031500b0039a62f79463mr4776127oie.41.1686217532902; Thu, 08 Jun 2023 02:45:32 -0700 (PDT) MIME-Version: 1.0 References: <20230525-2bab5376987792eab73507ac@orel> In-Reply-To: <20230525-2bab5376987792eab73507ac@orel> From: Haibo Xu Date: Thu, 8 Jun 2023 17:45:21 +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 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_REG_R= ISCV_CORE_REG(mode), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(sstatus), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(sie), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(stvec), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(sscratch), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(sepc), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(scause), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(stval), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(sip), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_CSR_REG(satp), > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_CSR | KVM_REG_RI= SCV_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_RI= SCV_ISA_EXT_A, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_C, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_D, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_F, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_H, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_I, > > + KVM_REG_RISCV | KVM_REG_SIZE_U64 | KVM_REG_RISCV_ISA_EXT | KVM_RI= SCV_ISA_EXT_M, > > I think all the above should have the size KVM_REG_SIZE_ULONG. Please als= o > test with a 32-bit host. > Hi Andrew, Just noticed the RISC-V 32-bit kvm selftests was not supported currently. 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? Regards, Haibo diff --git a/tools/testing/selftests/kvm/include/kvm_util_base.h b/tools/testing/selftests/kvm/include/kvm_util_base.h index ac4aaa21deee..a32ccc06435b 100644 --- a/tools/testing/selftests/kvm/include/kvm_util_base.h +++ b/tools/testing/selftests/kvm/include/kvm_util_base.h @@ -205,9 +205,9 @@ extern enum vm_guest_mode vm_mode_default; #elif defined(__riscv) -#if __riscv_xlen =3D=3D 32 -#error "RISC-V 32-bit kvm selftests not supported" -#endif +//#if __riscv_xlen =3D=3D 32 +//#error "RISC-V 32-bit kvm selftests not supported" +//#endif > > Thanks, > drew