Re: [PATCH 11/12] perf intel-pt: Add VM Time Correlation to decoder

From: Adrian Hunter
Date: Fri Apr 30 2021 - 01:01:55 EST

On 30/04/21 12:21 am, Andi Kleen wrote:
>> unchanging (during perf record) VMX TSC Offset and no VMX TSC scaling.
> For TSC scaling we would need to add side band to KVM, correct?
> I suppose it shouldn't be that hard to do that.

Probably we just need to know a single TSC scaling value per VM i.e. it could just be exported via sysfs or something.

There is a reasonable reason that TSC Offset might be changing i.e. to match Guest time, although that seems to be done by paravirtualization instead at the moment.
At the moment TSC Offset does change if Host time changes e.g. Guest has state saved before a Host reboot, and is resumed after the Host reboot

However, I can't think of a reason for changing the TSC Scaling value, except maybe if the VM is taken to a Host with a different TSC frequency.