From patchwork Tue Feb 3 09:02:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 5194 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1395NF9025899 for ; Tue, 3 Feb 2009 09:05:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751343AbZBCJFE (ORCPT ); Tue, 3 Feb 2009 04:05:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751655AbZBCJFE (ORCPT ); Tue, 3 Feb 2009 04:05:04 -0500 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 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n13951ie020816; Tue, 3 Feb 2009 04:05:01 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n13950pY018368; Tue, 3 Feb 2009 04:05:00 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 587) id BA0DD18D493; Tue, 3 Feb 2009 11:02:41 +0200 (IST) Date: Tue, 3 Feb 2009 11:02:41 +0200 From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] Initialize entire cpuid2 structure Message-ID: <20090203090241.GA30234@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Uninitialized fields may contain garbage. Signed-off-by: Gleb Natapov Acked-By: Amit Shah --- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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];