From patchwork Mon Jun 28 16:14:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/7] fix CPUID vendor override Date: Mon, 28 Jun 2010 06:14:09 -0000 From: Marcelo Tosatti X-Patchwork-Id: 57163 Message-Id: <8935499831312ec3e108287d3d49614915847ab2.1277741654.git.mtosatti@redhat.com> To: Anthony Liguori Cc: Andre Przywara , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org From: Andre Przywara the meaning of vendor_override is actually the opposite of how it is currently used :-( Fix it to allow KVM to export the non-native CPUID vendor if explicitly requested by the user. The intended behavior is: With TCG: - always inject the configured vendor (either hard-coded, in config files or via ",vendor=" commandline) With KVM: - by default inject the host's vendor - if the user specifies ",vendor=" on the commandline, use this instead of the host's vendor - all pre-configured vendors (hard-coded, config file) are ignored Signed-off-by: Andre Przywara Signed-off-by: Marcelo Tosatti --- target-i386/cpuid.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 6a0f7ca..fe0e6b2 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -982,7 +982,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); } }