From patchwork Fri Jun 28 15:55:39 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: 2799821 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6ABE9BF4A1 for ; Fri, 28 Jun 2013 15:56:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 925BF200DF for ; Fri, 28 Jun 2013 15:56:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C82CD201FB for ; Fri, 28 Jun 2013 15:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755479Ab3F1P4F (ORCPT ); Fri, 28 Jun 2013 11:56:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44157 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755427Ab3F1P4D (ORCPT ); Fri, 28 Jun 2013 11:56:03 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0846FA5464; Fri, 28 Jun 2013 17:56:03 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gleb Natapov , Marcelo Tosatti , kvm@vger.kernel.org (open list:Overall) Subject: [PULL 17/24] kvm: Change kvm_cpu_exec() argument to CPUState Date: Fri, 28 Jun 2013 17:55:39 +0200 Message-Id: <1372434946-18489-18-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372434946-18489-1-git-send-email-afaerber@suse.de> References: <1372434946-18489-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It no longer uses CPUArchState. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Acked-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Andreas Färber --- 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 4c7e329..12f6f32 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 d3e5e5e..7a1684e 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1607,9 +1607,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)