On Mon, 2021-04-26 at 15:59 +0300, Tzvetomir Stoyanov wrote: > On Mon, Apr 26, 2021 at 3:44 PM Steven Rostedt > 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/-/ > 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/ ------------------------------------------------------------------- <> (Raistlin Majere)