From patchwork Tue Nov 1 08:57:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Koi X-Patchwork-Id: 123044 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5C470B6F7D for ; Tue, 1 Nov 2011 19:58:05 +1100 (EST) Received: from localhost ([::1]:33433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLAAR-0005Wp-6X for incoming@patchwork.ozlabs.org; Tue, 01 Nov 2011 04:57:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLAAH-0005WT-4K for qemu-devel@nongnu.org; Tue, 01 Nov 2011 04:57:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLAAD-0007wt-24 for qemu-devel@nongnu.org; Tue, 01 Nov 2011 04:57:49 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:51596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLAAC-0007wj-Qi for qemu-devel@nongnu.org; Tue, 01 Nov 2011 04:57:44 -0400 Received: by ywb3 with SMTP id 3so8511399ywb.4 for ; Tue, 01 Nov 2011 01:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=Dfje281ZdbazlpmjKCh1+U8Uzw/G8c9xCrOXi4VjSEc=; b=eYfSmJOAthkZVYU8KCjVJ3Mq7M51uDbHVcILv1iqhqtJ5aZa1k09Sp5o7gBN9Rx2MM vQMxjRt0ZpFqgQVXwmoPiFLW9xPgMzjbTuLZmW+nTAth1ySqpsCV6rdxAp5G4nuDirTB iC1rofbM8KeCTVWaYNRKBU5hKcYDPAej+JSWw= Received: by 10.182.31.78 with SMTP id y14mr2528331obh.25.1320137864085; Tue, 01 Nov 2011 01:57:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.112.2 with HTTP; Tue, 1 Nov 2011 01:57:23 -0700 (PDT) From: Jun Koi Date: Tue, 1 Nov 2011 16:57:23 +0800 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.45 Subject: [Qemu-devel] [patch] remove dead code, and make cpu_exec_all() static 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 This patch removes dead code (kvm related) in cpu_exec_all(), and makes that static (since nobody uses it) Signed-off-by: Jun Koi diff --git a/cpus.c b/cpus.c index f768683..77282a1 100644 --- a/cpus.c +++ b/cpus.c @@ -85,6 +85,8 @@ typedef struct TimersState { TimersState timers_state; +static bool cpu_exec_all(void); + /* Return the virtual CPU time, based on the instruction counter. */ int64_t cpu_get_icount(void) { @@ -1016,7 +1018,7 @@ static int tcg_cpu_exec(CPUState *env) return ret; } -bool cpu_exec_all(void) +static bool cpu_exec_all(void) { int r; @@ -1033,12 +1035,7 @@ bool cpu_exec_all(void) (env->singlestep_enabled & SSTEP_NOTIMER) == 0); if (cpu_can_run(env)) { - if (kvm_enabled()) { - r = kvm_cpu_exec(env); - qemu_kvm_eat_signals(env); - } else { - r = tcg_cpu_exec(env); - } + r = tcg_cpu_exec(env); if (r == EXCP_DEBUG) { cpu_handle_guest_debug(env); break; diff --git a/cpus.h b/cpus.h index 3525375..4ea2fe2 100644 --- a/cpus.h +++ b/cpus.h @@ -14,7 +14,6 @@ void cpu_synchronize_all_post_init(void); /* vl.c */ extern int smp_cores; extern int smp_threads; -bool cpu_exec_all(void); void set_numa_modes(void); void set_cpu_log(const char *optarg); void set_cpu_log_filename(const char *optarg);