From patchwork Wed Oct 24 17:49:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 193896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9C4822C00A6 for ; Thu, 25 Oct 2012 05:25:26 +1100 (EST) Received: from localhost ([::1]:53141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5ds-0008Pd-GM for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 14:25:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5dl-0008Ow-5o for qemu-devel@nongnu.org; Wed, 24 Oct 2012 14:25:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR5dk-00068p-49 for qemu-devel@nongnu.org; Wed, 24 Oct 2012 14:25:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5dj-00068T-R3 for qemu-devel@nongnu.org; Wed, 24 Oct 2012 14:25:16 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9OIPAfK022049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Oct 2012 14:25:14 -0400 Received: from blackpad.lan.raisama.net (vpn1-4-109.gru2.redhat.com [10.97.4.109]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9OHmcCi007915; Wed, 24 Oct 2012 13:48:39 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 536AB20048A; Wed, 24 Oct 2012 15:50:09 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 24 Oct 2012 15:49:51 -0200 Message-Id: <1351101001-14589-18-git-send-email-ehabkost@redhat.com> In-Reply-To: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> References: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH 17/27] xen_machine_pv: use cpu_init() instead of cpu_x86_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org cpu_init() will be kept as the simple-to-use init+realize function that some code uses (e.g., *-user, and now xen_machine_pv too). This will make cpu_x86_init() be used directly only by the more specialized PC code, that will need to do additional initialization steps between the CPU object creation and the x86_cpu_realize() call. Signed-off-by: Eduardo Habkost --- hw/xen_machine_pv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 4264703..95833f4 100644 --- a/hw/xen_machine_pv.c +++ b/hw/xen_machine_pv.c @@ -35,7 +35,6 @@ static void xen_init_pv(QEMUMachineInitArgs *args) const char *kernel_filename = args->kernel_filename; const char *kernel_cmdline = args->kernel_cmdline; const char *initrd_filename = args->initrd_filename; - X86CPU *cpu; CPUX86State *env; DriveInfo *dinfo; int i; @@ -48,8 +47,7 @@ static void xen_init_pv(QEMUMachineInitArgs *args) cpu_model = "qemu32"; #endif } - cpu = cpu_x86_init(cpu_model); - env = &cpu->env; + env = cpu_init(cpu_model); env->halted = 1; /* Initialize backend core & drivers */