Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8661813rwd; Tue, 20 Jun 2023 19:12:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LhJ+efVoOHeTKWq2zGrK4MQ3qJ0El9A6hntHQDsU06D4Kq+t6ds6lBRJWgkCMyxmB3pkI X-Received: by 2002:a05:6a20:3d0e:b0:123:100e:c8b2 with SMTP id y14-20020a056a203d0e00b00123100ec8b2mr1087044pzi.59.1687313577248; Tue, 20 Jun 2023 19:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687313577; cv=none; d=google.com; s=arc-20160816; b=AGOjlOJ2V2g7ux21HvnIMr7OIAQYC+dbYEXO1Qx06aTFxsJoGtgbOVVhPV8gX4WkJC uPY+VmdZS1nkx+Sz1y4JtqG4Yqc8xNTI9KJ+r5ph8RUQNHAoz7gfxw4pvfjUpfSVG7wi WELm0h2/9D9REle3lUacP14CxcmMjB4uE1cQm2siAs2X/hsdYPGskqpvdYddaudJICrK tifuUykRfKPpA8mfAOFo8paqe6tycNtO4fa8Ax7NJSTbJ0iUJ8gffXDsDH9bPsE5DsSg ArFh2AHfbLWENH3gihc2NIkkLw6pchGJek3MvLyfOghp/c/Bm8zo8my+7Agm73gbhAy+ XWLw== 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=Wz+JcRD5iqUFNC0O0Ru60ZgS8tD+DjfgbMM6b7JgDDE=; b=uUL4jDtJwzslzliN2p/8ZeYgfbdRiGdkv0LEV4M1SYIxXetDv18KnspQBSISR4dS3b qUOjYpJX6sdl50d9+6aQeIq9VY07KG9MjfxzFl3nWxq3sMhXtftcHCPbK/ftpQ3r4kXb OZITxQKVqwGBX+CL7llXYGS+zudKUe/SFjtslwbZOrwDEz4tIQaOa2tA5Zz2cpG6nR6O 1CB4IuD/dTIaluoPYuyg8Wk6NQiAvNKVuLfpbPnTJOs2dclxfSFN1qN6nKgu4Kr13V5Z BFdPKATAHYBkfKB0N2VzzNHI07tPW2TixIDTHm47PvQYoZr1QS7GgzUf7Z0vUjWWC1lr aorQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=I4Xks4H0; 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 b18-20020a170902d89200b001ab06251f98si3004014plz.429.2023.06.20.19.12.44; Tue, 20 Jun 2023 19:12:57 -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=I4Xks4H0; 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 S229675AbjFUBza (ORCPT + 99 others); Tue, 20 Jun 2023 21:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjFUBz2 (ORCPT ); Tue, 20 Jun 2023 21:55:28 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4938D1989; Tue, 20 Jun 2023 18:55:27 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b44eddb52dso78037141fa.3; Tue, 20 Jun 2023 18:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687312525; x=1689904525; 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=Wz+JcRD5iqUFNC0O0Ru60ZgS8tD+DjfgbMM6b7JgDDE=; b=I4Xks4H0f9hjuiTto0xGg2qYpfM1NZn0dyFE3RFSgjOTxwdHLkw2aJFM6SQ4UPOBl2 dNK6TDWAZALS3CRzxzO+dpAo1U9mCItEUs562QTVmbmesDW2NSyCOoPgJOgoYQAz7I81 HLw63JGcQ4kMncWwX/yetxeXc4t9tZnic1kQbgvD1AUCJKn28T1HFnucS8Q2s7Nx+DQZ f8U5MS+CPM3LZ1R10maFt1FXao1Rfu9UuLwRlmRiKcyG4Eu87O2mrDltGfJ0J9bBeZ4/ piitDPizcx0RsJDQqHWespeaFg6I0iuKgvJ4MSz6hINYPHYT0FU7ayv5Ygm+4xicdr1J wVig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687312525; x=1689904525; 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=Wz+JcRD5iqUFNC0O0Ru60ZgS8tD+DjfgbMM6b7JgDDE=; b=W129HB9FhH5JNVs2scLt/rhx90qKLPViGO6DBe41xDon9XwqS8mec8sPsB6uDq0hyg SRFM4Cw/gk/lVF2yrFCbuO4jod/A2WvJ9HZpCvsO+VsJGwa3ox4Qvmp2vHH2vcfWSuru oXw8xoBBRIpF4Af5sogZ2A1LCPnyMXO40R6Bu3e817SR8OIGORaiQc9QqQ5JsdZbXAt0 edCKuUZRRzqYLxU/rjBfRhqNw73p8W0Zv+EVn+oamrloET8d34bPJ+9FO1U0jD92dEFU GlnPPApK6NIeQqi53/B6uLBA2X058FW0pdti1d04306KCKivqt4Eov3cqOIGWvZ52SjA vJ0g== X-Gm-Message-State: AC+VfDzKfRRcYEh9t4LA5zxCJZ2boj+NtFSZdjRzcvY6k4/wuNU38Sr+ pev1OvekFBHF+XbPkDZ1kLu/NsndCiVsFsSvYmA= X-Received: by 2002:a05:6512:1cd:b0:4f9:573a:689d with SMTP id f13-20020a05651201cd00b004f9573a689dmr610014lfp.37.1687312525203; Tue, 20 Jun 2023 18:55:25 -0700 (PDT) MIME-Version: 1.0 References: <8cd4ce50f5f4a639f4508085959aae222d4d4386.1686275310.git.haibo1.xu@intel.com> <20230609-fba04b424a4d46574e04e587@orel> <20230620-95ce8ab70956a72b9da3a31a@orel> In-Reply-To: <20230620-95ce8ab70956a72b9da3a31a@orel> From: Haibo Xu Date: Wed, 21 Jun 2023 09:55:13 +0800 Message-ID: Subject: Re: [PATCH v3 10/10] 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 , Ben Gardon , David Matlack , 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 autolearn=ham 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 Tue, Jun 20, 2023 at 6:44=E2=80=AFPM Andrew Jones wrote: > > On Tue, Jun 20, 2023 at 06:05:59PM +0800, Haibo Xu wrote: > > On Fri, Jun 9, 2023 at 9:35=E2=80=AFPM Andrew Jones wrote: > > > > > > On Fri, Jun 09, 2023 at 10:12:18AM +0800, Haibo Xu wrote: > > > > +static struct vcpu_reg_list aia_config =3D { > > > > + .sublists =3D { > > > > + BASE_SUBLIST, > > > > + AIA_REGS_SUBLIST, > > > > + {0}, > > > > + }, > > > > +}; > > > > + > > > > +static struct vcpu_reg_list fp_f_d_config =3D { > > > > + .sublists =3D { > > > > + BASE_SUBLIST, > > > > + FP_F_REGS_SUBLIST, > > > > + FP_D_REGS_SUBLIST, > > > > + {0}, > > > > + }, > > > > +}; > > > > + > > > > +struct vcpu_reg_list *vcpu_configs[] =3D { > > > > + &zicbo_config, > > > > + &aia_config, > > > > + &fp_f_d_config, > > > > +}; > > > > +int vcpu_configs_n =3D ARRAY_SIZE(vcpu_configs); > > > > -- > > > > 2.34.1 > > > > > > > > > > I see we have a bit of a problem with the configs for riscv. Since we > > > don't disable anything we're not testing, then for any test that is > > > missing, for example, the f and d registers, we'll get output like > > > "There are 66 new registers. Consider adding them to the blessed reg > > > list with the following lines:" and then a dump of all the f and d > > > registers. The test doesn't fail, but it's messy and confusing. Ideal= ly > > > we'd disable all registers of all sublists not in the config, probabl= y > > > by starting by disabling everything and then only reenabling the ones > > > in the config. > > > > > > Anything that can't be disabled is either a KVM bug, i.e. we should > > > be able to disable it, because we can't expect every host to have it, > > > or it needs to be in the base register sublist (meaning every host > > > will always have it). > > > > > > > HI Andrew, > > > > I found several multi-letters ISA EXT(AIA/SSTC etc) were not allowed > > to be disabled. > > Is it a bug? shall we fix it=EF=BC=9F > > Extensions that a guest could use (regardless of whether or not the host > described it in the guest's isa string), because the instructions or CSR > accesses don't trap, can't truly be disabled. So, it's not a bug to > prohibit disabling them and indeed the test cases should actually ensure > disabling them fails. > So these kinds of ISA_EXT_* regs should be in the base reg list, right? Thanks, Haibo > Thanks, > drew