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=-7.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 2C5B8ECDE28 for ; Wed, 11 Sep 2019 08:31:33 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id B46E6206CD for ; Wed, 11 Sep 2019 08:31:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B46E6206CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3034D4A5F0; Wed, 11 Sep 2019 04:31:32 -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 pt2jlu-drKxO; Wed, 11 Sep 2019 04:31:31 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 23C244A5DD; Wed, 11 Sep 2019 04:31:31 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C7EB74A5DD for ; Wed, 11 Sep 2019 04:31:29 -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 rqO4A5nGK3eA for ; Wed, 11 Sep 2019 04:31:28 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C17FD4A5DC for ; Wed, 11 Sep 2019 04:31:28 -0400 (EDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3E3E21000; Wed, 11 Sep 2019 01:31:28 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2E8103F67D; Wed, 11 Sep 2019 01:31:25 -0700 (PDT) Date: Wed, 11 Sep 2019 09:31:24 +0100 Message-ID: <86h85js083.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width In-Reply-To: <1568169216-12632-3-git-send-email-yuzenghui@huawei.com> References: <1568169216-12632-1-git-send-email-yuzenghui@huawei.com> <1568169216-12632-3-git-send-email-yuzenghui@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: linux-kernel@vger.kernel.org, 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 Wed, 11 Sep 2019 03:33:36 +0100, Zenghui Yu wrote: > > EC is the bits [31:26] of ESR_ELx on arm64 (HSR on arm). Print the > hex value with its exact width (8). > > Signed-off-by: Zenghui Yu > --- > virt/kvm/arm/trace.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virt/kvm/arm/trace.h b/virt/kvm/arm/trace.h > index 204d210d01c2..022b0a060034 100644 > --- a/virt/kvm/arm/trace.h > +++ b/virt/kvm/arm/trace.h > @@ -42,7 +42,7 @@ TRACE_EVENT(kvm_exit, > __entry->vcpu_pc = vcpu_pc; > ), > > - TP_printk("%s: HSR_EC: 0x%04x (%s), PC: 0x%08lx", > + TP_printk("%s: HSR_EC: 0x%02x (%s), PC: 0x%08lx", > __print_symbolic(__entry->ret, kvm_arm_exception_type), > __entry->esr_ec, > __print_symbolic(__entry->esr_ec, kvm_arm_exception_class), Although you're right that 8 bits ought to be enough, this is a change to the output of the tracepoint, which userspace could (does?) parse. I'm thus reluctant to change anything there, knowing that we don't lose any information, and just print two extra zeroes. Am I missing anything? Thanks, M. -- Jazz is not dead, it just smells funny. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm