On Fri, 23 Jan 2026 12:14:34 +0000,
Vincent Donnefort <[email protected]> wrote:
> 
> On Wed, Jan 07, 2026 at 03:40:22PM +0000, Marc Zyngier wrote:
> > On Tue, 02 Dec 2025 09:36:22 +0000,
> > Vincent Donnefort <[email protected]> wrote:
> > > 
> > Not strictly related to this patch, but I find that the trace itself
> > lacks context. For example:
> > 
> > [001]         323.847422: hyp_enter reason=hvc
> > [001]         323.847423: hyp_exit reason=eret_host
> > [001]         323.847688: hyp_enter reason=hvc
> > [001]         323.847688: hyp_exit reason=eret_host
> > [001]         323.847706: hyp_enter reason=hvc
> > [001]         323.847707: hyp_exit reason=eret_host
> > [001]         323.847722: hyp_enter reason=hvc
> > [001]         323.847723: hyp_exit reason=eret_host
> > 
> > That's all fine as long as I'm dealing with a single guest, or even
> > with a single vcpu. Trying to trace multiple guests, or even multiple
> > vcpus makes the whole thing completely unusable, because I have no
> > idea what I'm looking at.
> > 
> > To make this useful, having some context provided by the host really
> > is required.
> 
> I could add to the event header the VM pid related to the currently loaded 
> vCPU
> (if any). I can access it easily with host_kvm->userspace_pid. WDYS?

It really should be the thread name, just like we already have for the
kernel tracing. For example:

vgic_irq-2007    [005] ..... 180926.476735: kvm_sys_access: PC: 4119e4 
SYS_ICC_DIR_EL1 (3,0,12,11,1) write
vgic_irq-2010    [005] ..... 180926.534771: kvm_sys_access: PC: 40254c 
SYS_CNTV_CVAL_EL0 (3,3,14,3,2) write
vgic_irq-2010    [005] ..... 180926.534777: kvm_sys_access: PC: 402554 
SYS_CNTV_CTL_EL0 (3,3,14,3,1) write
vgic_irq-2010    [005] ..... 180926.534789: kvm_sys_access: PC: 4025b8 
SYS_CNTV_CTL_EL0 (3,3,14,3,1) write
vgic_irq-2011    [010] ..... 180926.534790: kvm_sys_access: PC: 40254c 
SYS_CNTV_CVAL_EL0 (3,3,14,3,2) write
vgic_irq-2010    [005] ..... 180926.534793: kvm_sys_access: PC: 4119e4 
SYS_ICC_DIR_EL1 (3,0,12,11,1) write

This is a single guest, with concurrent vcpus. I'd like to be able to
correlate that with what the hypervisor tracing outputs. At the very
least the thread's PID. But the VM itself is pretty much irrelevant.

Thanks,

        M.

-- 
Without deviation from the norm, progress is not possible.

Reply via email to