Re: [PATCH v12 20/24] virt: geniezone: Add tracing support for hyp call and vcpu exit_reason

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Jul 2024 16:24:32 +0800
Liju-clr Chen <liju-clr.chen@xxxxxxxxxxxx> wrote:

> From: Liju Chen <liju-clr.chen@xxxxxxxxxxxx>
> 
> Add tracepoints for hypervisor calls and VCPU exit reasons in GenieZone
> driver. It aids performance debugging by providing more information
> about hypervisor operations and VCPU behavior.
> 
> Command Usage:
> echo geniezone:* >> /sys/kernel/tracing/set_event
> echo 1 > /sys/kernel/tracing/tracing_on
> echo 0 > /sys/kernel/tracing/tracing_on
> cat /sys/kernel/tracing/trace
> 
> For example:
> crosvm_vcpu0-4874    [007] .....    94.757349: mtk_hypcall_enter: id=0xfb001005
> crosvm_vcpu0-4874    [007] .....    94.760902: mtk_hypcall_leave: id=0xfb001005 invalid=0
> crosvm_vcpu0-4874    [007] .....    94.760902: mtk_vcpu_exit: vcpu exit_reason=IRQ(0x92920003)
> 
> This example tracks a hypervisor function call by an ID (`0xbb001005`)
> from initiation to termination, which is supported (invalid=0). A vCPU
> exit is triggered by an Interrupt Request (IRQ) (exit reason: 0x92920003).
> 
> /* VM exit reason */
> enum {
> 	GZVM_EXIT_UNKNOWN = 0x92920000,
> 	GZVM_EXIT_MMIO = 0x92920001,
> 	GZVM_EXIT_HYPERCALL = 0x92920002,
> 	GZVM_EXIT_IRQ = 0x92920003,
> 	GZVM_EXIT_EXCEPTION = 0x92920004,
> 	GZVM_EXIT_DEBUG = 0x92920005,
> 	GZVM_EXIT_FAIL_ENTRY = 0x92920006,
> 	GZVM_EXIT_INTERNAL_ERROR = 0x92920007,
> 	GZVM_EXIT_SYSTEM_EVENT = 0x92920008,
> 	GZVM_EXIT_SHUTDOWN = 0x92920009,
> 	GZVM_EXIT_GZ = 0x9292000a,
> };
> 
> Signed-off-by: Yi-De Wu <yi-de.wu@xxxxxxxxxxxx>
> Signed-off-by: Liju Chen <liju-clr.chen@xxxxxxxxxxxx>


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux