Skip to contentSkip to conversation

x86: skip hyperv_clock test when host clocksource is not TSC

PATCH Applied Vitaly Kuznetsov 2 participants 2 messages Jun 17, 2020 – Jun 23, 2020 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: skip hyperv_clock test when host clocksource is not TSC

Hyper-V TSC page clocksource is TSC based so it requires host to use TSC for clocksource. While TSC is more or less standard for x86 hardware nowadays, when kvm-unit-tests are run in a VM the clocksource tends to be different (e.g. kvm-clock).

---
 x86/unittests.cfg | 1 +
 1 file changed, 1 insertion(+)
x86/unittests.cfg +1 -0
index 504e04e5f2b5..3a7915143479 100644
@@ -334,6 +334,7 @@ smp = 2
 extra_params = -cpu kvm64,hv_time
 arch = x86_64
 groups = hyperv
+check = /sys/devices/system/clocksource/clocksource0/current_clocksource=tsc
 
 [intel_iommu]
 file = intel-iommu.flat
Signature · 1 line
2.25.4
maintainer Applied
#1 lore raw
Quoted 16 lines · Vitaly Kuznetsov

Hyper-V TSC page clocksource is TSC based so it requires host to use TSC for clocksource. While TSC is more or less standard for x86 hardware nowadays, when kvm-unit-tests are run in a VM the clocksource tends to be different (e.g. kvm-clock).

---
 x86/unittests.cfg | 1 +
 1 file changed, 1 insertion(+)
x86/unittests.cfg +0 -0
index 504e04e5f2b5..3a7915143479 100644

x86/unittests.cfg smp = 2 · line 340

Quoted 7 lines
x86/unittests.cfg +1 -0
@@ -334,6 +334,7 @@ smp = 2
 extra_params = -cpu kvm64,hv_time
 arch = x86_64
 groups = hyperv
+check = /sys/devices/system/clocksource/clocksource0/current_clocksource=tsc
 
 [intel_iommu]
 file = intel-iommu.flat

Queued, thanks.

Paolo