From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kt0gp-00029E-K0 for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:57:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kt0go-00027r-Q4 for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:57:26 -0400 Received: from [199.232.76.173] (port=60909 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kt0go-00027e-9W for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:57:26 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:37468) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kt0go-0001CC-4n for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:57:26 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e8.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id m9NDs9eJ005033 for ; Thu, 23 Oct 2008 09:54:09 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9NDvOX0131082 for ; Thu, 23 Oct 2008 09:57:24 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9NDvN8Q031960 for ; Thu, 23 Oct 2008 09:57:24 -0400 Message-ID: <490082C1.7040502@us.ibm.com> Date: Thu, 23 Oct 2008 08:57:21 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1224771556-11146-1-git-send-email-glommer@redhat.com> <1224771556-11146-6-git-send-email-glommer@redhat.com> In-Reply-To: <1224771556-11146-6-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 05/32] use more meaningful values for kqemu_cpu_exec Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: jan.kiszka@siemens.com, jes@sgi.com, qemu-devel@nongnu.org, avi@qumranet.com, dmitry.baryshkov@siemens.com Glauber Costa wrote: > define constants that actually mean something instead of 1, 2, etc > > Signed-off-by: Glauber Costa > --- > cpu-exec.c | 4 ++-- > exec-all.h | 4 ++++ > kqemu.c | 12 ++++++------ > 3 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/cpu-exec.c b/cpu-exec.c > index f06df26..88b7d6f 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -339,10 +339,10 @@ int cpu_exec(CPUState *env1) > env->eflags = env->eflags | cc_table[CC_OP].compute_all() | (DF & DF_MASK); > ret = kqemu_cpu_exec(env); > env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C); > - if (ret == 1) { > + if (ret == EXEC_EXIT_INTR) { > /* exception */ > longjmp(env->jmp_env, 1); > - } else if (ret == 2) { > + } else if (ret == EXEC_EXIT_SOFTMMU) { > /* softmmu execution needed */ > } else { > if (env->interrupt_request != 0) { > diff --git a/exec-all.h b/exec-all.h > index e3da98a..c10248b 100644 > --- a/exec-all.h > +++ b/exec-all.h > @@ -356,6 +356,10 @@ static inline int can_do_io(CPUState *env) > } > #endif > > +#define EXEC_EXIT_DONE 0 > +#define EXEC_EXIT_INTR 1 > +#define EXEC_EXIT_SOFTMMU 2 > + > How about ACCEL_EXIT_? These codes are accelerator specific after all. Regards, Anthony Liguori