From: Andre Przywara <[email protected]> the meaning of vendor_override is actually the opposite of how it is currently used :-( This fix reverts the workaround 4dad7ff3 and replaces it with the correct version. Fix it to allow KVM to export the non-native CPUID vendor if explicitly requested by the user.
Signed-off-by: Andre Przywara <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index aaac0a7..eebf038 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -785,7 +785,7 @@ int cpu_x86_register (CPUX86State *env, const char *cpu_model) env->cpuid_vendor2 = CPUID_VENDOR_INTEL_2; env->cpuid_vendor3 = CPUID_VENDOR_INTEL_3; } - env->cpuid_vendor_override = def->vendor_override || kvm_enabled(); + env->cpuid_vendor_override = def->vendor_override; env->cpuid_level = def->level; if (def->family > 0x0f) env->cpuid_version = 0xf00 | ((def->family - 0x0f) << 20); @@ -962,7 +962,7 @@ static void get_cpuid_vendor(CPUX86State *env, uint32_t *ebx, * this if you want to use KVM's sysenter/syscall emulation * in compatibility mode and when doing cross vendor migration */ - if (kvm_enabled() && env->cpuid_vendor_override) { + if (kvm_enabled() && ! env->cpuid_vendor_override) { host_cpuid(0, 0, NULL, ebx, ecx, edx); } } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
