linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: suzuki.poulose@arm.com, linux-kernel@vger.kernel.org,
	james.morse@arm.com, julien.thierry.kdev@gmail.com,
	wanghaibin.wang@huawei.com, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width
Date: Wed, 11 Sep 2019 09:31:24 +0100	[thread overview]
Message-ID: <86h85js083.wl-maz@kernel.org> (raw)
In-Reply-To: <1568169216-12632-3-git-send-email-yuzenghui@huawei.com>

On Wed, 11 Sep 2019 03:33:36 +0100,
Zenghui Yu <yuzenghui@huawei.com> 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 <yuzenghui@huawei.com>
> ---
>  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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-11  8:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  2:33 [PATCH 0/2] KVM: arm/arm64: Two minor tracing changes Zenghui Yu
2019-09-11  2:33 ` [PATCH 1/2] KVM: arm/arm64: vgic: Use the appropriate TRACE_INCLUDE_PATH Zenghui Yu
2019-09-11  4:26   ` Masahiro Yamada
2019-09-11 15:37   ` Marc Zyngier
2019-09-11  2:33 ` [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width Zenghui Yu
2019-09-11  8:31   ` Marc Zyngier [this message]
2019-09-11  9:19     ` Zenghui Yu
2019-09-11 15:35       ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h85js083.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=wanghaibin.wang@huawei.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).