From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHD2-0002w7-PL for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:29:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLHD1-0003Kw-6x for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:29:08 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:34513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHD0-0003KK-Va for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:29:07 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Nov 2011 12:24:01 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pA1GLxFl246776 for ; Tue, 1 Nov 2011 12:22:00 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pA1GLw4S005913 for ; Tue, 1 Nov 2011 12:21:58 -0400 Message-ID: <4EB01CA0.6030507@us.ibm.com> Date: Tue, 01 Nov 2011 11:21:52 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E802C77.4020903@siemens.com> In-Reply-To: <4E802C77.4020903@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Simplify cpu_exec_all to tcg_exec_all List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel On 09/26/2011 02:40 AM, Jan Kiszka wrote: > After the removal of the non-threaded mode cpu_exec_all is now only used > by TCG. Refactor it accordingly, also dropping its unused return value. > > Signed-off-by: Jan Kiszka Applied. Thanks. Regards, Anthony Liguori > --- > cpus.c | 14 +++++--------- > cpus.h | 1 - > 2 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/cpus.c b/cpus.c > index 8978779..f983033 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -664,6 +664,8 @@ static void *qemu_kvm_cpu_thread_fn(void *arg) > return NULL; > } > > +static void tcg_exec_all(void); > + > static void *qemu_tcg_cpu_thread_fn(void *arg) > { > CPUState *env = arg; > @@ -685,7 +687,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) > } > > while (1) { > - cpu_exec_all(); > + tcg_exec_all(); > if (use_icount&& qemu_next_icount_deadline()<= 0) { > qemu_notify_event(); > } > @@ -925,7 +927,7 @@ static int tcg_cpu_exec(CPUState *env) > return ret; > } > > -bool cpu_exec_all(void) > +static void tcg_exec_all(void) > { > int r; > > @@ -942,12 +944,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; > @@ -957,7 +954,6 @@ bool cpu_exec_all(void) > } > } > exit_request = 0; > - return !all_cpu_threads_idle(); > } > > void set_numa_modes(void) > diff --git a/cpus.h b/cpus.h > index 5885885..bb91684 100644 > --- a/cpus.h > +++ b/cpus.h > @@ -15,7 +15,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);