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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36A51C433FE for ; Tue, 26 Apr 2022 21:18:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8D8DB4B1FE; Tue, 26 Apr 2022 17:18:37 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kxnzmvGGesYE; Tue, 26 Apr 2022 17:18:36 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 672544B1F2; Tue, 26 Apr 2022 17:18:36 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 02CC84B1ED for ; Tue, 26 Apr 2022 17:18:35 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CqjCCUzeHK5Z for ; Tue, 26 Apr 2022 17:18:33 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 970A44B1EC for ; Tue, 26 Apr 2022 17:18:33 -0400 (EDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id E415DB82353; Tue, 26 Apr 2022 21:18:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FA84C385A0; Tue, 26 Apr 2022 21:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651007910; bh=8f3lO6dfdoKe8ke0lndZvWlEYYmm+jgmcOHxg3DxCRc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZI2dGVkcjaHrC5YQ2Y7xLOgkgK7EaOCrIlEfHWEHMVkNk/cn/nh6HRPrFKJgZFf8Q qeH5EmKSHPlNcEqvGQMXdtZNvkmeHtPL6OWWYaP9Lumeij1BeC23Th6cGsueCvAGxH U+i5DOkWcM7MU+utQqaVyH+uViyELpkxDf6PIpVELm30PwNW3e91bnow/c+Mp+5tag 6m8EWfHjeFdZACab3uheJuuRwRotuOTuzk+T0UmncPanhl8qzogtdcWxjQ5t8ggGAO XqghafKcWtYDgu+m8U09ViGtRuftDkguiNSqW0AyLRCITECNrHmDWmrewRchNb43+q mFsJCoe5bnATw== 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 1njSZo-007Ctm-2j; Tue, 26 Apr 2022 22:18:28 +0100 Date: Tue, 26 Apr 2022 22:18:27 +0100 Message-ID: <871qxja6ho.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Subject: Re: [PATCH 2/2] KVM/arm64: Print emulated register table name when it is unsorted In-Reply-To: <20220425163904.859195-3-alexandru.elisei@arm.com> References: <20220425163904.859195-1-alexandru.elisei@arm.com> <20220425163904.859195-3-alexandru.elisei@arm.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") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, 25 Apr 2022 17:39:03 +0100, Alexandru Elisei wrote: > > When a sysreg table entry is out-of-order, KVM attempts to print the > address of the table: > > [ 0.143881] kvm [1]: sys_reg table (____ptrval____) out of order (0) > > Printing the name of the table instead of a pointer is more helpful in this > case: > > [ 0.143881] kvm [1]: sys_reg table sys_reg_descs out of order (0) > > Signed-off-by: Alexandru Elisei > --- > arch/arm64/kvm/sys_regs.c | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c > index 57302048afd0..7b62a2daf056 100644 > --- a/arch/arm64/kvm/sys_regs.c > +++ b/arch/arm64/kvm/sys_regs.c > @@ -2188,18 +2188,18 @@ static const struct sys_reg_desc cp15_64_regs[] = { > }; > > static bool check_sysreg_table(const struct sys_reg_desc *table, unsigned int n, > - bool is_32) > + const char *table_name, bool is_32) > { > unsigned int i; > > for (i = 0; i < n; i++) { > if (!is_32 && table[i].reg && !table[i].reset) { > - kvm_err("sys_reg table %p entry %d lacks reset\n", table, i); > + kvm_err("sys_reg table %s entry %d lacks reset\n", table_name, i); Instead of passing a table name, could we simply use something like %pS? If this works, it would be a good indication of both what table and what entry in that table is at fault. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm