From patchwork Tue Feb 17 15:45:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 7622 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 n1HFjkIn004486 for ; Tue, 17 Feb 2009 15:45:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750941AbZBQPpZ (ORCPT ); Tue, 17 Feb 2009 10:45:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752587AbZBQPpZ (ORCPT ); Tue, 17 Feb 2009 10:45:25 -0500 Received: from mx2.redhat.com ([66.187.237.31]:37883 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbZBQPpY (ORCPT ); Tue, 17 Feb 2009 10:45:24 -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 n1HFjNEB009510 for ; Tue, 17 Feb 2009 10:45:23 -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 n1HFjNM5018539; Tue, 17 Feb 2009 10:45:24 -0500 Received: from localhost (vpn-10-151.str.redhat.com [10.32.10.151]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1HFjJkn001575; Tue, 17 Feb 2009 10:45:21 -0500 From: Amit Shah To: avi@redhat.com Cc: kvm@vger.kernel.org, Amit Shah Subject: [PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it Date: Tue, 17 Feb 2009 21:15:35 +0530 Message-Id: <1234885535-8332-1-git-send-email-amit.shah@redhat.com> 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 host_cpuid now accepts a 'count' parameter for cpuid. Initialise the value of ecx before any call to the function. Signed-off-by: Amit Shah --- qemu/qemu-kvm-x86.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 5264015..b1e2da2 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -534,6 +534,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv) #endif copy.regs[R_EAX] = 0; + copy.regs[R_ECX] = 0; qemu_kvm_cpuid_on_env(©); limit = copy.regs[R_EAX]; @@ -559,6 +560,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv) } copy.regs[R_EAX] = 0x80000000; + copy.regs[R_ECX] = 0; qemu_kvm_cpuid_on_env(©); limit = copy.regs[R_EAX];