Re: [PATCH] target/i386: Reset TSCs of parked vCPUs too on VM reset

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

 



On 12.12.2024 17:00, Igor Mammedov wrote:
On Thu, 12 Dec 2024 15:51:15 +0100
"Maciej S. Szmigiero" <mail@xxxxxxxxxxxxxxxxxxxxx> wrote:

From: "Maciej S. Szmigiero" <maciej.szmigiero@xxxxxxxxxx>

Since commit 5286c3662294 ("target/i386: properly reset TSC on reset")
QEMU writes the special value of "1" to each online vCPU TSC on VM reset
to reset it.

However parked vCPUs don't get that handling and due to that their TSCs
get desynchronized when the VM gets reset.
This in turn causes KVM to turn off PVCLOCK_TSC_STABLE_BIT in its exported
PV clock.
Note that KVM has no understanding of vCPU being currently parked.

Without PVCLOCK_TSC_STABLE_BIT the sched clock is marked unstable in
the guest's kvm_sched_clock_init().
This causes a performance regressions to show in some tests.

Fix this issue by writing the special value of "1" also to TSCs of parked
vCPUs on VM reset.

does TSC still ticks when vCPU is parked or it is paused at some value?


A parked vCPUs isn't being scheduled/run so it's a bit of an
academic discussion whether its (virtual) TSC ticks or not.

TSC of a parked vCPU gets synced once again ("0" write) when it
gets unparked.

Thanks,
Maciej





[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