Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp405834rwo; Tue, 1 Aug 2023 20:04:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEYdum4jUzxRW7capkmH+dRDBnOQ8FEE/d0CQdPNhfAz9fA2ni7dqG9H7IrHYy3Z5+Tid/e X-Received: by 2002:a17:906:10cd:b0:99b:4bab:2839 with SMTP id v13-20020a17090610cd00b0099b4bab2839mr4595867ejv.55.1690945468370; Tue, 01 Aug 2023 20:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690945468; cv=none; d=google.com; s=arc-20160816; b=t0ZCzOFg1kxtnq/PJtV1T5Mo6sIhRCCDdSVtn8wzyF/7SJZ6JDkQhCwnbyrleSpePb fGnxtyGs3BYPYKFLBBWb0SV0MXi+VSLd/RnBdqmUHjxgdE4pLWj10AbiL9MxMoFxKwuL cIDTgxaB4vey2qTNt+LHKENEO8qr0uiZK3rxw2Mb0Pw2qQEyIzM1FAj7bRkCCsUXIcO/ v38J7TSO8OW1kz3LGW0KKpJY0A7ICT2hpAM3xrg0cEj5qNdBi3oUuNZ3YnmWEwrFLyzS 4ZOOalJi8ecnrB+jIkXvICUK8LA1sZAWBA0KqSQ87Sqce5Wu4dZSJ6MVvLNKoElHVcF/ CP+w== 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=kfJe9BpFl8b7JDGf91rp83jhgS2ZS1vO2M4ah8lJAhM=; fh=xbjH2bFZwnGdlRcEB+TpufUstMYSnK1cK5t2oX6lRmg=; b=mUPVJCnZ0KjsBVx7sPJ7f7AGhjDuhW10u8A2aRl2GsM6Xh5KmDzUIvPkdvvHzn3puQ LAeh1mOWG+OYZu9KVznwXrfRwAz9EzeChkBqnFaS7UWljGPJ6urXKqKGGUD7Vuxep7gk knKS6o19EbXSn7EOoHB654CestmLwnzloW7Zht4DDYI3sWjXOv62u5GmanxEZL8aPU9m fCmm9dyoD5nu0mLqakF2kEUAIkn6uzglfpcvDEtt5Uwc7YN7764tTs2o/ogwzu2bYicn +iBmFLsrOhd1VW/DGg1jLG+0R6z8Ous3HsjrNUqCDr+zbEB7xUs5a4jKLWPpqmabl3LO bymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=h3VdRHTB; 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 v6-20020a17090606c600b00991f8bce3cbsi9033975ejb.722.2023.08.01.20.04.04; Tue, 01 Aug 2023 20:04: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=h3VdRHTB; 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 S231470AbjHBCBU (ORCPT + 99 others); Tue, 1 Aug 2023 22:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjHBCBT (ORCPT ); Tue, 1 Aug 2023 22:01:19 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85861E53; Tue, 1 Aug 2023 19:01:18 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe389d6f19so4308404e87.3; Tue, 01 Aug 2023 19:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690941676; x=1691546476; 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=kfJe9BpFl8b7JDGf91rp83jhgS2ZS1vO2M4ah8lJAhM=; b=h3VdRHTBZt3cAaKjjOGTTnH7QUnbMtm6Pfq3stfPGTm4mGpcTwULiRKf3CaYovDR20 8BFdQiehASCHuPW0FD8aYP7gdkn0vMPjanuhskZDiKWWWq6EW0I4yFlEJXP0AdsttVU+ sUkCi6wjzSV6FSARA9S45ckqy0Co2jFZs4AQGD9eyYwYlwN6AUpwfQpuHjGYbch1gesZ lMrRztTovO3MgPL1ioeEYBTRgp7uVk72WX0WEz99HSmBUE9P6ecI20k8Zu/T+R2D/u44 1zu6DFOuvA+Uj8GnL6IoZvBklZun6O4VnzRr4+dQTWBTyF+m9jXmQvIGH+Ij769R4eBX BUIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690941676; x=1691546476; 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=kfJe9BpFl8b7JDGf91rp83jhgS2ZS1vO2M4ah8lJAhM=; b=Nrx6aBEG0utbIIgjzZJAwCOqZc8AFNBQYmthi71ughaDkazNVgwgyxaf8OXs1coUmu cdfnxtUsKWT7k/P7K+Yv9wOwgYFcOpwf1BbRMSjs7Qjyd1g0S1OvWbaeCvq++H5ZVmna J1U8KxUCuQ8vtzOR6vopx6efykY83c/OUawZhJKKdmackJdQHlxw1nnn/8nsFWYYsIHl 9hxfDTkL+1M6QbNU1TEng0Co1qEXh5fJ60e5fdqEW+bsXOWJE4aCWfzsdc0zvWbzK6rt 01MN+zw3UUsA+k9UvUgTpiAV757/R44QrO3nKxectSr+cssxncqyzrayKNipHU/R7xJf qMvg== X-Gm-Message-State: ABy/qLY4VkV4tnVa3kLYfnV5Yx7xkvJL4kTdzPHgB81KNsvh3FgT/Kn6 jh0usv0SIAULPWcqoJY8BJTz9HURcvPbI2LxnzM= X-Received: by 2002:a2e:b001:0:b0:2b6:c2e4:a57a with SMTP id y1-20020a2eb001000000b002b6c2e4a57amr4186390ljk.38.1690941676288; Tue, 01 Aug 2023 19:01:16 -0700 (PDT) MIME-Version: 1.0 References: <20230728-5b0f530eba70ad08e8f4a67d@orel> In-Reply-To: <20230728-5b0f530eba70ad08e8f4a67d@orel> From: Haibo Xu Date: Wed, 2 Aug 2023 10:01:05 +0800 Message-ID: Subject: Re: [PATCH 0/4] RISCV: Add kvm Sstc timer selftest To: Andrew Jones Cc: Sean Christopherson , Haibo Xu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Anup Patel , Atish Patra , Vipin Sharma , Colton Lewis , Marc Zyngier , Andrew Jones , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, kvm-riscv@lists.infradead.org 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_BLOCKED,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 Fri, Jul 28, 2023 at 5:57=E2=80=AFPM Andrew Jones wrote: > > On Fri, Jul 28, 2023 at 09:37:36AM +0800, Haibo Xu wrote: > > On Thu, Jul 27, 2023 at 11:14=E2=80=AFPM Sean Christopherson wrote: > > > > > > On Thu, Jul 27, 2023, Haibo Xu wrote: > > > > The sstc_timer selftest is used to validate Sstc timer functionalit= y > > > > in a guest, which sets up periodic timer interrupts and check the > > > > basic interrupt status upon its receipt. > > > > > > > > This KVM selftest was ported from aarch64 arch_timer and tested > > > > with Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > > > Would it be possible to extract the ARM bits from arch_timer and make= the bulk of > > > the test common to ARM and RISC-V? At a glance, there is quite a bit= of copy+paste. > > > > Sure, I will have a try to consolidate the common code for ARM and RISC= -V in v2. > > > > Yes, afaict, we should be able to make aarch64/arch_timer.c another "spli= t > test", like we did for aarch64/get-reg-list.c, but before we do that, I'd > like to get an ack from the Arm maintainers on the get-reg-list split to > be sure that approach is acceptable. > Yes, we can re-use the split method. Since there is less configuration data that should be handled, I think it may be easier for the timer test to consolidate the code, since most of the operations can be overloaded for different ARCH. I'll have a try and send the v2 soon! Thanks! > Thanks, > drew