From patchwork Wed Jul 9 22:04:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 368919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 59CB314008D for ; Fri, 11 Jul 2014 11:02:23 +1000 (EST) Received: from localhost ([::1]:41512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5PED-0002gN-Dn for incoming@patchwork.ozlabs.org; Thu, 10 Jul 2014 21:02:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zza-0008GU-Et for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4zzU-0000J0-9k for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:05:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zzU-0000Ia-0Z for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:05:28 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s69M5Ri8006456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 9 Jul 2014 18:05:27 -0400 Received: from localhost (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s69M5Qgw014944; Wed, 9 Jul 2014 18:05:26 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 9 Jul 2014 19:04:19 -0300 Message-Id: <1404943462-711-23-git-send-email-ehabkost@redhat.com> In-Reply-To: <1404943462-711-1-git-send-email-ehabkost@redhat.com> References: <1404943462-711-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 22/25] target-i386: Add AccelState parameter to cpu_x86_create() 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 Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 3 ++- target-i386/cpu.c | 4 ++-- target-i386/cpu.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2cf22b1..03a108c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -960,7 +960,8 @@ static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id, X86CPU *cpu; Error *local_err = NULL; - cpu = cpu_x86_create(cpu_model, icc_bridge, &local_err); + cpu = cpu_x86_create(cpu_model, icc_bridge, current_machine->accelerator, + &local_err); if (local_err != NULL) { error_propagate(errp, local_err); return NULL; diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 45c662d..428ced3 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2015,7 +2015,7 @@ static void x86_cpu_load_def(X86CPU *cpu, X86CPUDefinition *def, Error **errp) } X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge, - Error **errp) + AccelState *accel, Error **errp) { X86CPU *cpu = NULL; X86CPUClass *xcc; @@ -2077,7 +2077,7 @@ X86CPU *cpu_x86_init(const char *cpu_model) Error *error = NULL; X86CPU *cpu; - cpu = cpu_x86_create(cpu_model, NULL, &error); + cpu = cpu_x86_create(cpu_model, NULL, NULL, &error); if (error) { goto out; } diff --git a/target-i386/cpu.h b/target-i386/cpu.h index e634d83..421859a 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -964,7 +964,7 @@ typedef struct CPUX86State { X86CPU *cpu_x86_init(const char *cpu_model); X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge, - Error **errp); + AccelState *accel, Error **errp); int cpu_x86_exec(CPUX86State *s); void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf); void x86_cpudef_setup(void);