qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000
@ 2014-06-04  1:10 Jidong Xiao
  2014-06-04  7:09 ` Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: Jidong Xiao @ 2014-06-04  1:10 UTC (permalink / raw)
  To: qemu-devel, KVM

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 <jidong.xiao@gmail.com>
---
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];

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-08-13 12:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04  1:10 [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000 Jidong Xiao
2014-06-04  7:09 ` Paolo Bonzini
2014-06-04  7:17   ` Jidong Xiao
2014-06-04 19:08     ` Bandan Das
2014-06-04 19:47       ` Jidong Xiao
2014-06-04 21:26         ` Bandan Das
2014-08-12 18:55     ` Eduardo Habkost
2014-08-12 19:12       ` Paolo Bonzini
2014-08-12 19:29         ` Eduardo Habkost
2014-08-13 12:18           ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).