kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm/arm64: Two minor tracing changes
@ 2019-09-11  2:33 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  2:33 ` [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width Zenghui Yu
  0 siblings, 2 replies; 8+ messages in thread
From: Zenghui Yu @ 2019-09-11  2:33 UTC (permalink / raw)
  To: maz, james.morse, julien.thierry.kdev, suzuki.poulose
  Cc: kvmarm, linux-arm-kernel, linux-kernel

This series includes two very minor tracing changes in KVM arm/arm64.
See patches for details.  Thanks!

Zenghui Yu (2):
  KVM: arm/arm64: vgic: Use the appropriate TRACE_INCLUDE_PATH
  KVM: arm/arm64: Print the EC hex value with its exact width

 virt/kvm/arm/trace.h      | 2 +-
 virt/kvm/arm/vgic/trace.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.19.1


_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] KVM: arm/arm64: vgic: Use the appropriate TRACE_INCLUDE_PATH
  2019-09-11  2:33 [PATCH 0/2] KVM: arm/arm64: Two minor tracing changes Zenghui Yu
@ 2019-09-11  2:33 ` 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
  1 sibling, 2 replies; 8+ messages in thread
From: Zenghui Yu @ 2019-09-11  2:33 UTC (permalink / raw)
  To: maz, james.morse, julien.thierry.kdev, suzuki.poulose
  Cc: linux-kernel, Masahiro Yamada, kvmarm, linux-arm-kernel

Commit 49dfe94fe5ad ("KVM: arm/arm64: Fix TRACE_INCLUDE_PATH") fixes
TRACE_INCLUDE_PATH to the correct relative path to the define_trace.h
and explains why did the old one work.

The same fix should be applied to virt/kvm/arm/vgic/trace.h.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 virt/kvm/arm/vgic/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/arm/vgic/trace.h b/virt/kvm/arm/vgic/trace.h
index 55fed77a9f73..4fd4f6db181b 100644
--- a/virt/kvm/arm/vgic/trace.h
+++ b/virt/kvm/arm/vgic/trace.h
@@ -30,7 +30,7 @@ TRACE_EVENT(vgic_update_irq_pending,
 #endif /* _TRACE_VGIC_H */
 
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH ../../../virt/kvm/arm/vgic
+#define TRACE_INCLUDE_PATH ../../virt/kvm/arm/vgic
 #undef TRACE_INCLUDE_FILE
 #define TRACE_INCLUDE_FILE trace
 
-- 
2.19.1


_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width
  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  2:33 ` Zenghui Yu
  2019-09-11  8:31   ` Marc Zyngier
  1 sibling, 1 reply; 8+ messages in thread
From: Zenghui Yu @ 2019-09-11  2:33 UTC (permalink / raw)
  To: maz, james.morse, julien.thierry.kdev, suzuki.poulose
  Cc: kvmarm, linux-arm-kernel, linux-kernel

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),
-- 
2.19.1


_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] KVM: arm/arm64: vgic: Use the appropriate TRACE_INCLUDE_PATH
  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
  1 sibling, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2019-09-11  4:26 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: maz, Linux Kernel Mailing List, kvmarm, linux-arm-kernel

On Wed, Sep 11, 2019 at 11:35 AM Zenghui Yu <yuzenghui@huawei.com> wrote:
>
> Commit 49dfe94fe5ad ("KVM: arm/arm64: Fix TRACE_INCLUDE_PATH") fixes
> TRACE_INCLUDE_PATH to the correct relative path to the define_trace.h
> and explains why did the old one work.
>
> The same fix should be applied to virt/kvm/arm/vgic/trace.h.
>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>

Please feel free to replace the Cc: with my:

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Thanks.


> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  virt/kvm/arm/vgic/trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/arm/vgic/trace.h b/virt/kvm/arm/vgic/trace.h
> index 55fed77a9f73..4fd4f6db181b 100644
> --- a/virt/kvm/arm/vgic/trace.h
> +++ b/virt/kvm/arm/vgic/trace.h
> @@ -30,7 +30,7 @@ TRACE_EVENT(vgic_update_irq_pending,
>  #endif /* _TRACE_VGIC_H */
>
>  #undef TRACE_INCLUDE_PATH
> -#define TRACE_INCLUDE_PATH ../../../virt/kvm/arm/vgic
> +#define TRACE_INCLUDE_PATH ../../virt/kvm/arm/vgic
>  #undef TRACE_INCLUDE_FILE
>  #define TRACE_INCLUDE_FILE trace
>
> --
> 2.19.1
>
>


-- 
Best Regards
Masahiro Yamada
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width
  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
  2019-09-11  9:19     ` Zenghui Yu
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Zyngier @ 2019-09-11  8:31 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: linux-kernel, kvmarm, linux-arm-kernel

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.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width
  2019-09-11  8:31   ` Marc Zyngier
@ 2019-09-11  9:19     ` Zenghui Yu
  2019-09-11 15:35       ` Marc Zyngier
  0 siblings, 1 reply; 8+ messages in thread
From: Zenghui Yu @ 2019-09-11  9:19 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-kernel, kvmarm, linux-arm-kernel

Hi Marc,

On 2019/9/11 16:31, Marc Zyngier wrote:
> 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.

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.

> I'm thus reluctant to change anything there, knowing that we don't
> lose any information, and just print two extra zeroes.

Anyway this is not a fix, feel free to ignore it if you're worried about
that there might be some issues ;)

> Am I missing anything?

No.


Thanks,
zenghui

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] KVM: arm/arm64: Print the EC hex value with its exact width
  2019-09-11  9:19     ` Zenghui Yu
@ 2019-09-11 15:35       ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2019-09-11 15:35 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: linux-kernel, kvmarm, linux-arm-kernel

On Wed, 11 Sep 2019 10:19:05 +0100,
Zenghui Yu <yuzenghui@huawei.com> wrote:
> 
> Hi Marc,
> 
> On 2019/9/11 16:31, Marc Zyngier wrote:
> > 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.
> 
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] KVM: arm/arm64: vgic: Use the appropriate TRACE_INCLUDE_PATH
  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
  1 sibling, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2019-09-11 15:37 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: linux-kernel, Masahiro Yamada, kvmarm, linux-arm-kernel

On Wed, 11 Sep 2019 03:33:35 +0100,
Zenghui Yu <yuzenghui@huawei.com> wrote:
> 
> Commit 49dfe94fe5ad ("KVM: arm/arm64: Fix TRACE_INCLUDE_PATH") fixes
> TRACE_INCLUDE_PATH to the correct relative path to the define_trace.h
> and explains why did the old one work.
> 
> The same fix should be applied to virt/kvm/arm/vgic/trace.h.
> 
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>

Applied to -next with Masahiro's RB.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-11 15:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-09-11  9:19     ` Zenghui Yu
2019-09-11 15:35       ` Marc Zyngier

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).