From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: [PATCH] Initialize entire cpuid2 structure Date: Tue, 3 Feb 2009 11:02:41 +0200 Message-ID: <20090203090241.GA30234@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: avi@redhat.com Return-path: Received: from mx2.redhat.com ([66.187.237.31]:56523 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbZBCJFD (ORCPT ); Tue, 3 Feb 2009 04:05:03 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n13951b7020643 for ; Tue, 3 Feb 2009 04:05:01 -0500 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Uninitialized fields may contain garbage. Signed-off-by: Gleb Natapov 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.