Skip to contentSkip to conversation

Reinstate cpuid vendor override when kvm is enabled

PATCH In review Avi Kivity 3 participants 3 messages Dec 28, 2009 – Dec 29, 2009 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 Reinstate cpuid vendor override when kvm is enabled

Due to upstream qemu changes we no longer expose the host cpu vendor id to the guest. This leads to failures when the syscall/sysenter instructions are used in compatibility mode.

Change the default to override when kvm is enabled.

---
 target-i386/helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-i386/helper.c +1 -1
index 9a50da6..b58fd82 100644
@@ -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;
+    env->cpuid_vendor_override = def->vendor_override || kvm_enabled();
     env->cpuid_level = def->level;
     if (def->family > 0x0f)
         env->cpuid_version = 0xf00 | ((def->family - 0x0f) << 20);
Signature · 1 line
1.6.5.3
#1 lore raw
Quoted 5 lines · Avi Kivity

Due to upstream qemu changes we no longer expose the host cpu vendor id to the guest. This leads to failures when the syscall/sysenter instructions are used in compatibility mode.

Change the default to override when kvm is enabled.

Applied and queued for stable-0.12, thanks.

#2 lore raw
In reply to Avi Kivity
Quoted 5 lines · Avi Kivity

Due to upstream qemu changes we no longer expose the host cpu vendor id to the guest. This leads to failures when the syscall/sysenter instructions are used in compatibility mode.

Change the default to override when kvm is enabled.

This is a good change, although it always bothers me when there has to be a difference between kvm-enabled and kvm-disabled, because I run some guests in both modes at different times.

Out of interest, are the guest-visible differences between kvm-enabled mode and kvm-disabled mode documented somewhere?

Thanks,
-- Jamie