Which clocksource does KVM use?

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

 



I am running QEMU with KVM using the below command line -

sudo ./qemu-system-x86_64 -m 1024 -machine pc-i440fx-3.0
-cpu qemu64,-kvmclock -accel kvm -netdev
tap,id=tap1,ifname=tap0,script=no,downscript=no
-device virtio-net-pci,netdev=tap1,mac=00:00:00:00:00:00
-drive file=ubuntu-16.04.server.qcow2,format=qcow2,if=none,id=img-direct
-device virtio-blk-pci,drive=img-direct


I can see that the current_clocksource used by the VM that is spawned
is reported as "tsc".

/sys/devices/system/clocksource/clocksource0$ cat current_clocksource
tsc

I collect a trace of the guest execution using IntelPT after running
the below command -

sudo ./perf kvm --guest --guestkallsyms=guest-kallsyms
--guestmodules=guest-modules
record -e intel_pt// -m ,65536

The IntelPT trace reveals that the function "read_hpet" gets called continuously
while I expected the function "read_tsc" to be called.

Does KVM change the clocksource in any way? I expect the clocksource
to be set at boot time,
how and why did the clocksource change later? Does KVM not support the
tsc clocksource ?

Note:

I am using QEMU version 3.0. The guest runs a 4.4.0-116-generic linux kernel.
Both my qemu host as well as the target architecture is x86_64. The
host machine is
also using "tsc" clocksource.

Best Regards,
Arnab



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux