summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrIng <labs@cyring.fr>2020-06-27 11:44:32 +0000
committerCyrIng <labs@cyring.fr>2020-06-27 11:44:32 +0000
commit26ac82e6a2a3878ab106737c1f6ea630bd2e0b68 (patch)
treed1ccf65c5af94c65d06be32f5497bf64fcdb0cfa
parent56cec8fb2af9600fa82fd702ef9e8c5d3f37f577 (diff)
[Hyper-V] Collect is limited to TSC1.79
-rw-r--r--corefreqk.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/corefreqk.c b/corefreqk.c
index a59a762..f035a02 100644
--- a/corefreqk.c
+++ b/corefreqk.c
@@ -7936,11 +7936,12 @@ static enum hrtimer_restart Cycle_GenuineIntel(struct hrtimer *pTimer)
hrtimer_cb_get_time(pTimer),
RearmTheTimer);
-#if FEAT_DBG > 0
- RDTSC64(Core->Counter[1].TSC);
-#else
- Counters_Generic(Core, 1);
-#endif
+ if (PUBLIC(RO(Proc))->HypervisorID != HYPERV_HYPERV) {
+ Counters_Generic(Core, 1);
+ } else {
+ RDTSC64(Core->Counter[1].TSC);
+ }
+
if (Core->Bind == PUBLIC(RO(Proc))->Service.Core)
{
PKG_Counters_Generic(Core, 1);
@@ -8049,11 +8050,13 @@ static enum hrtimer_restart Cycle_AuthenticAMD(struct hrtimer *pTimer)
hrtimer_forward(pTimer,
hrtimer_cb_get_time(pTimer),
RearmTheTimer);
-#if FEAT_DBG > 0
- RDTSC64(Core->Counter[1].TSC);
-#else
- Counters_Generic(Core, 1);
-#endif
+
+ if (PUBLIC(RO(Proc))->HypervisorID != HYPERV_HYPERV) {
+ Counters_Generic(Core, 1);
+ } else {
+ RDTSC64(Core->Counter[1].TSC);
+ }
+
if (Core->Bind == PUBLIC(RO(Proc))->Service.Core)
{
PKG_Counters_Generic(Core, 1);