All of lore.kernel.org
 help / color / mirror / Atom feed
* Clocksource Drift Issues in guests with KVM enabled
@ 2021-05-20 12:55 Arnabjyoti Kalita
  0 siblings, 0 replies; only message in thread
From: Arnabjyoti Kalita @ 2021-05-20 12:55 UTC (permalink / raw)
  To: kvm

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-20 13:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 12:55 Clocksource Drift Issues in guests with KVM enabled Arnabjyoti Kalita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.