Goal ---- Test the presence of Intel CPU feature 'invtsc' (Invariant Time Stamp Counter") in the guest CPU *only* explicitly passing the CPU flag to QEMU, which is possible via libvirt 'host-passthrough' (in QEMU parlance, it is "-cpu host+invtsc"). This can be verified by noticing the presence of the flag "nonstop_tsc" when you run `cat /proc/cpuinfo`. When you don't explicitly specify the 'invtsc' flag to QEMU, you should *not* see the presence of "nonstop_tsc" in the guest. Test ==== When you run the script `host-passthrough_without_invtsc_CPU_flag.bash`, and log into the guest, you will *not* see the "nonstop_tsc" feature flag: $ cat /proc/cpuinfo | grep nonstop_tsc $ echo $? 1 But when you run the script `host-passthrough_with_invtsc_CPU_flag.bash`, and log into the guest, you will see the 'nonstop_tsc': $ cat /proc/cpuinfo | grep nonstop_tsc flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc up arch_perfmon rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms References ---------- (1) https://bugzilla.redhat.com/show_bug.cgi?id=1384124 -- cpu flag nonstop_tsc is not present in guest with host-passthrough and feature policy require invtsc (2) https://bugzilla.redhat.com/show_bug.cgi?id=990051 -- (NonstopTSCFlag) nonstop_tsc cpu flag support for KVM guests