Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp596292ybe; Wed, 11 Sep 2019 01:33:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFC09lHXa6M6dvNA2rJJtPmpWyNy4hpmp9jg/E1HQd5/zLCIHuszrX43N1SC0ZoH+kxLGF X-Received: by 2002:aa7:db05:: with SMTP id t5mr35771652eds.242.1568190826147; Wed, 11 Sep 2019 01:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568190826; cv=none; d=google.com; s=arc-20160816; b=bg4L7ufEh9DLZTC5qVpJjJvxPAmStptdlcqsJ/8oAfHo2KW7D46/mncAJw3GPL1xmQ wD87ni2JaheuU1VyKmQHE50z8Q4WgCdtfbCsklw0AiOUMnGzWNAqmk0PhuCIg/6xP6fC tLqa0ME6VbugQAZt2VLZwjRjEILeffQFA1W3ci6iwbzcRUJCxkc7bIPVqUR4qhgyJk28 pllLcPluGeR+hgyik5jTMyXpZQzpWNRhlxvPWpsoh9dmW/v5U7S2OaGAckZuEYlBvXL6 qGFH46XioDLPpkG6aUGvYI6wNnURI3RldJvABiLfM/EDorn2fdBDAQrM6UD8kTmmuzN6 IrOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=W1S1SgfgvFpm0sm2Pz5e/J6D4W+qrnkZrt3yewbYWjA=; b=XXSUsWeaaQQ+9Hr++eNYpziqBYrQGSP0ybV0FOUtwkkwPyevjP2yn2S4SEydhqPWar nf+KEVrb5IWAgXTODE3mpdO2riYEqliTnxcU3LbRPOrKlP8tf6vDc1MpisnzTOW2UbJ3 cSpcrRCtuqgyJ35JStgBM/dQHCIH/ucsyo/0132X3/VwXxu5rTuXIpuEFbtoCiPVzA3o aBtlvFW9yqDTScAF1c7R+lue7ksyulx1cqZCSv21tWjh4WtPkApVrlENQSkApMjGTgzy +sFtip4Bh4fnwW3Qnqbi8ADIMWPeewJJsatgwYBSZxE24zAfEcYVqy+LwPJcNGUlEc5K 5kzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si12044093eds.29.2019.09.11.01.33.21; Wed, 11 Sep 2019 01:33:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbfIKIb3 (ORCPT + 99 others); Wed, 11 Sep 2019 04:31:29 -0400 Received: from foss.arm.com ([217.140.110.172]:43776 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726724AbfIKIb2 (ORCPT ); Wed, 11 Sep 2019 04:31:28 -0400 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 Cc: , , , , , , 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") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.