All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [qemu-kvm/stable] fix CPUID vendor override
@ 2010-04-11 20:15 Andre Przywara
  0 siblings, 0 replies; only message in thread
From: Andre Przywara @ 2010-04-11 20:15 UTC (permalink / raw)
  To: avi; +Cc: kvm, Andre Przywara

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 <andre.przywara@amd.com>
---
 target-i386/helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

I already sent appropriate patches for upstream qemu git HEAD and
qemu stable. This fix is especially for qemu-kvm stable,
as it differs from upstream QEMU.

Regards,
Andre.

diff --git a/target-i386/helper.c b/target-i386/helper.c
index fb22f88..ed77a71 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -518,7 +518,7 @@ static 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);
@@ -1662,7 +1662,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);
     }
 }
-- 
1.6.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-11 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-11 20:15 [PATCH] [qemu-kvm/stable] fix CPUID vendor override Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.