In case if host machine supports performance-energy bias
capability it should not be propagated to KVM hypervisor.
Otherwise the kernel tries to do read MSR_IA32_ENERGY_PERF_BIAS
register and cause kernel panic (general protection fault).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
struct kvm_cpuid_entry2 *entry = &kvm_cpuid->entries[i];
switch (entry->function) {
+ case 6:
+ /* Clear presence of IA32_ENERGY_PERF_BIAS */
+ entry->ecx = entry->ecx & ~(1 << 3);
+ break;
case CPUID_FUNC_PERFMON:
entry->eax = 0x00; /* disable it */
break;