qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] CPU vendor in KVM


From: 李春奇
Subject: [Qemu-devel] CPU vendor in KVM
Date: Sat, 4 May 2013 15:50:51 +0800

Hi Jan and All,
I find that when enable KVM with qemu, vendor ID of simulated CPU will be set the same as host, but other features such as level, family, model, stepping are not changed. This may bring out a confusing result, the simulated CPU has a vendor name of "GenuineIntel" but with family number "16".

I disabled the related code in function cpu_x86_find_by_name:
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index e2302d8..df0e82e 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1295,7 +1295,8 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *name)
              * KVM's sysenter/syscall emulation in compatibility mode and
              * when doing cross vendor migration
              */
-            if (kvm_enabled()) {
+            //if (kvm_enabled()) {
+            if (0) {
                 uint32_t  ebx = 0, ecx = 0, edx = 0;
                 host_cpuid(0, 0, NULL, &ebx, &ecx, &edx);
                 x86_cpu_vendor_words2str(x86_cpu_def->vendor, ebx, edx, ecx);

And the information of CPU remains consistent and the VM runs OK, even though with nested environment.

Why should qemu set simulated cpu's vendor same as the host in KVM environment?

-- 
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China

reply via email to

[Prev in Thread] Current Thread [Next in Thread]