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 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 6AC3EC5ACAE for ; Wed, 11 Sep 2019 15:35:40 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id E22CB2084D for ; Wed, 11 Sep 2019 15:35:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E22CB2084D 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 334C34A5E7; Wed, 11 Sep 2019 11:35:39 -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 2-FZk6rrID7c; Wed, 11 Sep 2019 11:35:38 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 038714A523; Wed, 11 Sep 2019 11:35:38 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 417024A50F for ; Wed, 11 Sep 2019 11:35:37 -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 LisnZcVHslCM for ; Wed, 11 Sep 2019 11:35:36 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 26F944A500 for ; Wed, 11 Sep 2019 11:35:36 -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 A8DB628; Wed, 11 Sep 2019 08:35:35 -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 9954E3F67D; Wed, 11 Sep 2019 08:35:33 -0700 (PDT) Date: Wed, 11 Sep 2019 16:35:27 +0100 Message-ID: <868squsv5s.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: References: <1568169216-12632-1-git-send-email-yuzenghui@huawei.com> <1568169216-12632-3-git-send-email-yuzenghui@huawei.com> <86h85js083.wl-maz@kernel.org> 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) 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 10:19:05 +0100, Zenghui Yu wrote: > > Hi Marc, > > On 2019/9/11 16:31, Marc Zyngier wrote: > > 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. > > Well-written userspace tools should only parse the low 8 bits (if they > do parse). But even if the high bits are parsed, they're always 0. > So I don't think this change will have a bad impact on userspace. The problem is that we don't only cater for well written SW. We also support the broken stuff, unfortunately. 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 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 D022EC49ED6 for ; Wed, 11 Sep 2019 15:35:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A05DE2084D for ; Wed, 11 Sep 2019 15:35:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zt9WFdqT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A05DE2084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pYGEI8OAH9nkNTdroNofzcyuZziFsLXmmZqw0k+yUHg=; b=Zt9WFdqTO80wE7 PEOmdk47wmM7ng7tSznHJRVZq/yWkeoOvRzY13WopGrHOUkzjDtrW+rolO+21XpKO3Zl34WB1gk5e lJemCTFQ7ulVUsRlcHR+03+/6o0KufsOvVws0gM9x/aZVWL1Ovnin8zjJSZAWz7D01uEMCbE2uYUw Kj3A+O8RattYoMSeFxx426PiLUsb50TDjEnNssVSp6dvE3159LqJjv8g2oVbcIGzfZ77rU/nNpSmt 2TfNmKpQ6w1M38q0+7KcpCoNLQjZU+A+ceESaKe7BcbW5P3LdgcW4WypP60EXqbQJtrVZPqLG6PRg 9ShutxzaQUVExXgcEPZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i84ei-0008Bg-I4; Wed, 11 Sep 2019 15:35:40 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i84ef-0008At-3Q for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2019 15:35:38 +0000 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 A8DB628; Wed, 11 Sep 2019 08:35:35 -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 9954E3F67D; Wed, 11 Sep 2019 08:35:33 -0700 (PDT) Date: Wed, 11 Sep 2019 16:35:27 +0100 Message-ID: <868squsv5s.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: References: <1568169216-12632-1-git-send-email-yuzenghui@huawei.com> <1568169216-12632-3-git-send-email-yuzenghui@huawei.com> <86h85js083.wl-maz@kernel.org> 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) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190911_083537_182690_AF30619D X-CRM114-Status: GOOD ( 18.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 11 Sep 2019 10:19:05 +0100, Zenghui Yu wrote: > > Hi Marc, > > On 2019/9/11 16:31, Marc Zyngier wrote: > > 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. > > Well-written userspace tools should only parse the low 8 bits (if they > do parse). But even if the high bits are parsed, they're always 0. > So I don't think this change will have a bad impact on userspace. The problem is that we don't only cater for well written SW. We also support the broken stuff, unfortunately. 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 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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 BB278C5ACAE for ; Wed, 11 Sep 2019 15:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 810FB2084D for ; Wed, 11 Sep 2019 15:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568216137; bh=WpkelQj8A7nj+hvouPzufjXNd3IIxMc4ASMGpD8eSmQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=Ed/6nS9GGhjUE4ydwgmUxiY+kJYc8LwF+KuJRa3e2OapzyAkh38N0Jmepk2aYm1zs wPQfPLtj5IejZeyrxMD7TffKptzQ4ea5pGMynKMRxLTGIUpJev80Ei9PwLpdeuBQLQ hjE4jFpe9kEy+uuYQ7FD4tmBck9Q7YglSp65B9Ik= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728617AbfIKPfg (ORCPT ); Wed, 11 Sep 2019 11:35:36 -0400 Received: from foss.arm.com ([217.140.110.172]:49682 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728244AbfIKPfg (ORCPT ); Wed, 11 Sep 2019 11:35:36 -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 A8DB628; Wed, 11 Sep 2019 08:35:35 -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 9954E3F67D; Wed, 11 Sep 2019 08:35:33 -0700 (PDT) Date: Wed, 11 Sep 2019 16:35:27 +0100 Message-ID: <868squsv5s.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: References: <1568169216-12632-1-git-send-email-yuzenghui@huawei.com> <1568169216-12632-3-git-send-email-yuzenghui@huawei.com> <86h85js083.wl-maz@kernel.org> 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) 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 10:19:05 +0100, Zenghui Yu wrote: > > Hi Marc, > > On 2019/9/11 16:31, Marc Zyngier wrote: > > 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. > > Well-written userspace tools should only parse the low 8 bits (if they > do parse). But even if the high bits are parsed, they're always 0. > So I don't think this change will have a bad impact on userspace. The problem is that we don't only cater for well written SW. We also support the broken stuff, unfortunately. Thanks, M. -- Jazz is not dead, it just smells funny.