public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Initialize entire cpuid2 structure
@ 2009-02-03  9:02 Gleb Natapov
  2009-02-03 10:09 ` Amit Shah
  2009-02-03 12:27 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2009-02-03  9:02 UTC (permalink / raw)
  To: avi; +Cc: kvm

Uninitialized fields may contain garbage.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
index 01748ed..d2247c9 100644
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -468,6 +468,8 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *e, uint32_t function,
     env->regs[R_ECX] = count;
     qemu_kvm_cpuid_on_env(env);
     e->function = function;
+    e->flags = 0;
+    e->index = 0;
     e->eax = env->regs[R_EAX];
     e->ebx = env->regs[R_EBX];
     e->ecx = env->regs[R_ECX];
--
			Gleb.

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

end of thread, other threads:[~2009-02-03 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-03  9:02 [PATCH] Initialize entire cpuid2 structure Gleb Natapov
2009-02-03 10:09 ` Amit Shah
2009-02-03 12:27 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox