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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 971D5C433F5 for ; Thu, 17 Feb 2022 09:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236696AbiBQJMN (ORCPT ); Thu, 17 Feb 2022 04:12:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbiBQJML (ORCPT ); Thu, 17 Feb 2022 04:12:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D421B1FA6B for ; Thu, 17 Feb 2022 01:11:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 701D66154A for ; Thu, 17 Feb 2022 09:11:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6D2C340E8; Thu, 17 Feb 2022 09:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645089115; bh=W116x973bwtLdnAHZvJERNqs+XQltGCdpLQTmAJHJTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mvoMMo8PBRH9C4KJx32BGJFVcIWFZ24EHXg156fNhUTQBemtQ6QD6KekukM0oYqh0 jg4Y2Yad6zNl5dGXdpC/qc30quthzBb27IqCWBJ73ju5QqkvOQ8X5w//SIasAgRE2O w9fYKm0r9nd0K1gL1+POhKFioHVmWGWFBr61lSiJz1j4pK5TkE1kfoFN8tnfw3e6H5 ZlYD2nuU2LomdaOawbTBzsx842tKPPSY5+HOdwNyXjlOhkhP3F52PnxBUyvS+1FrjH UliYNwXhfnSnGHwiKh9GkmoNL5CYaQ6yO+sAQra+nZ6WS2aVw+mUHxozdQyIrt8pOr kARY7qwGYug2g== 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 1nKcpN-008WCN-RK; Thu, 17 Feb 2022 09:11:53 +0000 Date: Thu, 17 Feb 2022 09:11:53 +0000 Message-ID: <874k4x502u.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Reiji Watanabe , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Alexandru Elisei , Suzuki K Poulose , Andrew Jones , Paolo Bonzini , Will Deacon , Peter Shier , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata Subject: Re: [PATCH 2/2] KVM: arm64: selftests: Introduce get_set_regs_perf test In-Reply-To: References: <20220217034947.180935-1-reijiw@google.com> <20220217034947.180935-2-reijiw@google.com> 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: oupton@google.com, reijiw@google.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, drjones@redhat.com, pbonzini@redhat.com, will@kernel.org, pshier@google.com, ricarkol@google.com, jingzhangos@google.com, rananta@google.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 On Thu, 17 Feb 2022 04:52:10 +0000, Oliver Upton wrote: > > Hi Reiji, > > First off, thanks for looking into this! Seems like a very useful thing > to test :-) > > On Wed, Feb 16, 2022 at 07:49:47PM -0800, Reiji Watanabe wrote: > > Introduce a simple performance test of KVM_GET_ONE_REG/KVM_SET_ONE_REG > > for registers that are returned by KVM_GET_REG_LIST. This is a pseudo > > process of saving/restoring registers during live migration, and this > > test quantifies the performance of the process. > > > > Signed-off-by: Reiji Watanabe > > --- > > tools/testing/selftests/kvm/.gitignore | 1 + > > tools/testing/selftests/kvm/Makefile | 1 + > > .../selftests/kvm/aarch64/get_set_regs_perf.c | 456 ++++++++++++++++++ > [...] > Would it make sense to test some opt-in capabilities that expose > additional registers (PMU, SVE, etc.)? I think this is important. System registers are usually saved/restored in groups, and due to the way we walk the sysreg array, timings are unlikely to be uniform. Getting a grip on that could help restructure the walking if required (either per-group arrays, or maybe a tree structure). Note that all of this could equally apply to the guest trapping (the walk is the same). And yes, there are a lot of commonalities with get-reg-list, so reusing some of the existing infrastructure would be a good thing. M. -- Without deviation from the norm, progress is not possible.