qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000


From: Jidong Xiao
Subject: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000
Date: Tue, 3 Jun 2014 21:10:06 -0400

Hi,

Since Linux kernel 3.5, KVM has set eax to KVM_CPUID_FEATURES, for
leaf 0x40000000, see this:

https://github.com/torvalds/linux/commit/57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190

But qemu still tries to set it to 0. It would be better to make qemu
and kvm consistent. This patch just fixes this issue.

Signed-off-by: Jidong Xiao <address@hidden>
---
diff --git a/qemu-2.0.0/target-i386/kvm.c.orig b/qemu-2.0.0/target-i386/kvm.c
index 4389959..b8b282d 100644
--- a/qemu-2.0.0/target-i386/kvm.c.orig
+++ b/qemu-2.0.0/target-i386/kvm.c
@@ -530,7 +530,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
     memcpy(signature, "KVMKVMKVM\0\0\0", 12);
     c = &cpuid_data.entries[cpuid_i++];
     c->function = KVM_CPUID_SIGNATURE | kvm_base;
-    c->eax = 0;
+   c->eax = KVM_CPUID_FEATURES;
     c->ebx = signature[0];
     c->ecx = signature[1];
     c->edx = signature[2];



reply via email to

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