From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B2FDC2B9F4 for ; Tue, 22 Jun 2021 07:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CFEA611BF for ; Tue, 22 Jun 2021 07:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229702AbhFVHfK (ORCPT ); Tue, 22 Jun 2021 03:35:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:59432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbhFVHfJ (ORCPT ); Tue, 22 Jun 2021 03:35:09 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DB146128C; Tue, 22 Jun 2021 07:32:54 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lvatw-0092VW-AY; Tue, 22 Jun 2021 08:32:52 +0100 Date: Tue, 22 Jun 2021 08:32:51 +0100 Message-ID: <878s32cq1o.wl-maz@kernel.org> From: Marc Zyngier To: Andrew Jones Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, ricarkol@google.com, eric.auger@redhat.com, alexandru.elisei@arm.com, pbonzini@redhat.com Subject: Re: [PATCH v3 0/5] KVM: arm64: selftests: Fix get-reg-list In-Reply-To: <20210622070732.zod7gaqhqo344vg6@gator> References: <20210531103344.29325-1-drjones@redhat.com> <20210622070732.zod7gaqhqo344vg6@gator> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: drjones@redhat.com, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, ricarkol@google.com, eric.auger@redhat.com, alexandru.elisei@arm.com, pbonzini@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Andrew, On Tue, 22 Jun 2021 08:07:32 +0100, Andrew Jones wrote: > > On Mon, May 31, 2021 at 12:33:39PM +0200, Andrew Jones wrote: > > v3: > > - Took Ricardo's suggestions in order to avoid needing to update > > prepare_vcpu_init, finalize_vcpu, and check_supported when adding > > new register sublists by better associating the sublists with their > > vcpu feature bits and caps [Ricardo] > > - We now dynamically generate the vcpu config name by creating them > > from its sublist names [drew] > > > > v2: > > - Removed some cruft left over from a previous more complex design of the > > config command line parser > > - Dropped the list printing factor out patch as it's not necessary > > - Added a 'PASS' output for passing tests to allow testers to feel good > > - Changed the "up to date with kernel" comment to reference 5.13.0-rc2 > > > > > > Since KVM commit 11663111cd49 ("KVM: arm64: Hide PMU registers from > > userspace when not available") the get-reg-list* tests have been > > failing with > > > > ... > > ... There are 74 missing registers. > > The following lines are missing registers: > > ... > > > > where the 74 missing registers are all PMU registers. This isn't a > > bug in KVM that the selftest found, even though it's true that a > > KVM userspace that wasn't setting the KVM_ARM_VCPU_PMU_V3 VCPU > > flag, but still expecting the PMU registers to be in the reg-list, > > would suddenly no longer have their expectations met. In that case, > > the expectations were wrong, though, so that KVM userspace needs to > > be fixed, and so does this selftest. > > > > We could fix the test with a one-liner since we just need a > > > > init->features[0] |= 1 << KVM_ARM_VCPU_PMU_V3; > > > > in prepare_vcpu_init(), but that's too easy, so here's a 5 patch patch > > series instead :-) The reason for all the patches and the heavy diffstat > > is to prepare for other vcpu configuration testing, e.g. ptrauth and mte. > > With the refactoring done in this series, we should now be able to easily > > add register sublists and vcpu configs to the get-reg-list test, as the > > last patch demonstrates with the pmu fix. > > > > Thanks, > > drew > > > > > > Andrew Jones (5): > > KVM: arm64: selftests: get-reg-list: Introduce vcpu configs > > KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs > > at once > > KVM: arm64: selftests: get-reg-list: Provide config selection option > > KVM: arm64: selftests: get-reg-list: Remove get-reg-list-sve > > KVM: arm64: selftests: get-reg-list: Split base and pmu registers > > > > tools/testing/selftests/kvm/.gitignore | 1 - > > tools/testing/selftests/kvm/Makefile | 1 - > > .../selftests/kvm/aarch64/get-reg-list-sve.c | 3 - > > .../selftests/kvm/aarch64/get-reg-list.c | 439 +++++++++++++----- > > 4 files changed, 321 insertions(+), 123 deletions(-) > > delete mode 100644 tools/testing/selftests/kvm/aarch64/get-reg-list-sve.c > > > > -- > > 2.31.1 > > > > Gentle ping. > > I'm not sure if I'm pinging Marc or Paolo though. MAINTAINERS shows Paolo > as all kvm selftests, but I think Marc has started picking up the AArch64 > specific kvm selftests. I'm happy to queue this series. > Marc, if you've decided to maintain AArch64 kvm selftests, would you be > opposed to adding > > F: tools/testing/selftests/kvm/*/aarch64/ > F: tools/testing/selftests/kvm/aarch64/ > > to "KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)"? No problem to add this, but I *will* rely on you (and whoever wants to part-take) to do the bulk of the reviewing. Do we have a deal? Thanks, M. -- Without deviation from the norm, progress is not possible.