Re: Instructions for clock sync for tracing host/guest

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

 



On Fri, 23 Apr 2021 11:16:50 +0300
Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote:

> Currently we collect that information from quemu, is there a way to
> get it from crosvm ? If yes, a crosvm support can be implemented in
> trace-cmd. But as I said, it is not mandatory to have it for the
> trace, I can send you a patch next week addressing this gap in the
> implementation.

I think we should be able to get the above information during the KVM
timesync logic. The host can enable KVM events (specifically
kvm_entry), and that should give use the pids.

 # trace-cmd record -e kvm_entry ssh guest taskset -c 0 ls \; taskset -c 1 cat /etc/passwd
 # trace-cmd report
[..]
           <...>-129042 [004]1122452427093922: kvm_entry:            vcpu 0
           <...>-129043 [005]1122452427148178: kvm_entry:            vcpu 1
           <...>-129042 [004]1122452427150380: kvm_entry:            vcpu 0
           <...>-129043 [005]1122452427201498: kvm_entry:            vcpu 1

There, I see the guest vcpu 0 is controlled by the host thread with pid
129042 and vcpu 1 is controlled by host thread pid 129043.

-- Steve



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

  Powered by Linux