]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: Remove implicit rdtsc() from kvm_compute_l1_tsc_offset()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 26 Apr 2024 14:57:20 +0000 (15:57 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 22 May 2024 00:05:40 +0000 (17:05 -0700)
commitf1a578acf38f36aee7cee01bad446c85c7aee6e0
treec44280e42a4bba280be2f6d25e4dc84675f5db56
parent23aafc74193512fb9d9c035f1610bb54b14b49b4
KVM: x86: Remove implicit rdtsc() from kvm_compute_l1_tsc_offset()

Let the callers pass the host TSC value in as an explicit parameter.

This leaves some fairly obviously stupid code, which using this function
to compare the guest TSC at some *other* time, with the newly-minted TSC
value from rdtsc(). Unless it's being used to measure *elapsed* time,
that isn't very sensible.

In this case, "obviously stupid" is an improvement over being non-obviously
so.

No functional change intended.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/x86.c