Re: Instructions for clock sync for tracing host/guest

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

 



On Mon, 2021-04-26 at 15:59 +0300, Tzvetomir Stoyanov wrote:
> On Mon, Apr 26, 2021 at 3:44 PM Steven Rostedt <rostedt@xxxxxxxxxxx>
> wrote:
> > 
> > 
> > We need to find a way to do this without qemu. It's only the thread
> > mapping
> > that is missing here, nothing else. And KVM sync should still work.
> 
> The problem is to find the VM specific directory in the KVM debugfs,
> where the VM TSC parameters are. The name of the directory is
> /sys/kernel/debug/kvm/<some PID>-<number>/
> The PID is the qemu process which runs the VM. I wonder how it looks
> in crosvm ?
> 
I can't double check as I don't have a crossvm environment handy, but I
guess it looks the same, and the PID is the one of whatever task in
crossvm issues the KVM_CREATE_VM ioctl (and the fd returned by such
call).

In QEMU, such process then creates one thread for each vCPU... Again, I
don't really know for sure, but I guess it would be similar in crossvm?

If yes, AFAICT, kvm_entry events can tell us the PIDs of such threads.
So the challenge here is getting from the PID of a thread to the PID of
the process that created it.

Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux