Clocksource Drift Issues in guests with KVM enabled

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

 



Hello all,

I am running a record and replay experiment with QEMU where I record
timer events in QEMU when it starts in KVM mode and replay them when
QEMU starts in TCG mode. I use the below command line to start QEMU in
record mode -

sudo ./qemu-system-x86_64 -m 1024 --machine pc-i440fx-2.5 -cpu
qemu64,-kvmclock -enable-kvm -clock_replay
mode=record,file=clock_record9.txt -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=~/os_images_for_qemu/ubuntu-16.04-desktop-amd64.qcow2,format=qcow2,if=none,id=img-direct
-device virtio-blk-pci,drive=img-direct

My host is running Linux kernel 5.8 with VMEXITs enabled for tsc
accesses since I need to replay them as well. I use QEMU version
5.0.1. The host and guest architecture is x86-64.

I save the state of the guest in QEMU by doing a "stop + savevm +
continue" from the monitor. I load the guest saved state later when I
do a replay.

When I unpause/continue the guest, I see messages like -
"
Marking tsc unstable since the clock skew is too large.
Switching to clocksource hpet.
"

I load the saved guest state in TCG mode of QEMU.

My questions are as follows-

1. Is the above message anything to worry about? When I load the guest
state in TCG mode, can I be certain that it will mimic the time in the
guest after it was unpaused in KVM mode (during record)?

2. I cannot use kvmclock as my clocksource since I load the guest in
TCG mode and QEMU TCG doesn't recognize kvmclock as one of the clock
sources. Is HPET a good clocksource for the guest to fall back on?

Thank you very much.

Best Regards,
Arnabjyoti Kalita



[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