From patchwork Sun Jun 16 15:57:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 251701 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7EF2E2C00B1 for ; Mon, 17 Jun 2013 02:04:11 +1000 (EST) Received: from localhost ([::1]:50060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoFR3-0007H7-Aq for incoming@patchwork.ozlabs.org; Sun, 16 Jun 2013 12:04:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoFLI-0006zQ-9n for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:58:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoFLG-0006uw-QF for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:58:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59987 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoFLG-0006tW-Kk for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:58:10 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1694DA5077; Sun, 16 Jun 2013 17:58:10 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 16 Jun 2013 17:57:31 +0200 Message-Id: <1371398269-6213-12-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1371398269-6213-1-git-send-email-afaerber@suse.de> References: <1371398269-6213-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Marcelo Tosatti , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gleb Natapov , "open list:Overall" Subject: [Qemu-devel] [PATCH qom-cpu v2 11/29] kvm: Change kvm_cpu_exec() argument to CPUState 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: Andreas Färber Acked-by: Paolo Bonzini Reviewed-by: Richard Henderson --- cpus.c | 2 +- include/sysemu/kvm.h | 2 +- kvm-all.c | 3 +-- kvm-stub.c | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cpus.c b/cpus.c index bbaf13c..47ab818 100644 --- a/cpus.c +++ b/cpus.c @@ -752,7 +752,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg) while (1) { if (cpu_can_run(cpu)) { - r = kvm_cpu_exec(env); + r = kvm_cpu_exec(cpu); if (r == EXCP_DEBUG) { cpu_handle_guest_debug(env); } diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 5adb044..fe8bc40 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -147,9 +147,9 @@ int kvm_has_gsi_routing(void); int kvm_has_intx_set_mask(void); int kvm_init_vcpu(CPUState *cpu); +int kvm_cpu_exec(CPUState *cpu); #ifdef NEED_CPU_H -int kvm_cpu_exec(CPUArchState *env); #if !defined(CONFIG_USER_ONLY) void *kvm_ram_alloc(ram_addr_t size); diff --git a/kvm-all.c b/kvm-all.c index 1675311..90b89cd 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1602,9 +1602,8 @@ void kvm_cpu_synchronize_post_init(CPUState *cpu) cpu->kvm_vcpu_dirty = false; } -int kvm_cpu_exec(CPUArchState *env) +int kvm_cpu_exec(CPUState *cpu) { - CPUState *cpu = ENV_GET_CPU(env); struct kvm_run *run = cpu->kvm_run; int ret, run_ret; diff --git a/kvm-stub.c b/kvm-stub.c index 50af700..5457fe8 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -54,9 +54,9 @@ void kvm_cpu_synchronize_post_init(CPUState *cpu) { } -int kvm_cpu_exec(CPUArchState *env) +int kvm_cpu_exec(CPUState *cpu) { - abort (); + abort(); } int kvm_has_sync_mmu(void)