Patchwork [v3,10/17] target-i386: Use Hypervisor vendor in -machine pc, accel=kvm.

login
register
mail settings
Submitter Don Slutz
Date Sept. 17, 2012, 1:39 p.m.
Message ID <1347889189-9199-18-git-send-email-Don@CloudSwitch.com>
Download mbox | patch
Permalink /patch/184440/
State New
Headers show

Comments

Don Slutz - Sept. 17, 2012, 1:39 p.m.
Signed-off-by: Don Slutz <Don@CloudSwitch.com>
---
 target-i386/kvm.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

Patch

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index bf27793..b8789f2 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -392,13 +392,15 @@  int kvm_arch_init_vcpu(CPUX86State *env)
     if (env->cpuid_hv_level == 0) {
         memcpy(signature, "KVMKVMKVM\0\0\0", 12);
         c->eax = 0;
+        c->ebx = signature[0];
+        c->ecx = signature[1];
+        c->edx = signature[2];
     } else {
-        memcpy(signature, "Microsoft Hv", 12);
         c->eax = env->cpuid_hv_level;
+        c->ebx = env->cpuid_hv_vendor1;
+        c->ecx = env->cpuid_hv_vendor2;
+        c->edx = env->cpuid_hv_vendor3;
     }
-    c->ebx = signature[0];
-    c->ecx = signature[1];
-    c->edx = signature[2];
 
     c = &cpuid_data.entries[cpuid_i++];
     memset(c, 0, sizeof(*c));