Skip to contentSkip to conversation

Initialize entire cpuid2 structure

PATCH Applied Gleb Natapov 3 participants 3 messages Feb 3, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Initialize entire cpuid2 structure

Uninitialized fields may contain garbage.

qemu/qemu-kvm-x86.c +2 -0
index 01748ed..d2247c9 100644
@@ -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.

Applied
#2 lore raw
In reply to Gleb Natapov
Quoted 3 lines · Gleb Natapov

Uninitialized fields may contain garbage.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function