[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 05/32] use more meaningful values for kqemu_cpu_
From: |
Glauber Costa |
Subject: |
[Qemu-devel] Re: [PATCH 05/32] use more meaningful values for kqemu_cpu_exec |
Date: |
Thu, 23 Oct 2008 12:23:04 -0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Thu, Oct 23, 2008 at 08:57:21AM -0500, Anthony Liguori wrote:
> Glauber Costa wrote:
>> define constants that actually mean something instead of 1, 2, etc
>>
>> Signed-off-by: Glauber Costa <address@hidden>
>> ---
>> 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.
I believe ACCEL_EXIT is confusing. ACCEL_EXEC_EXIT would be better, since
it makes it clear that it is used in exec context. However, if we're droping
the cpu_exec patch, we can drop this one too.
>
> Regards,
>
> Anthony Liguori
>
- [Qemu-devel] [PATCH 02/32] protect exec-all.h frm multiple inclusion, (continued)
- [Qemu-devel] [PATCH 02/32] protect exec-all.h frm multiple inclusion, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 03/32] change definition of FILE for linux, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 04/32] move kqemu_cpu_exec to kqemu.c, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 05/32] use more meaningful values for kqemu_cpu_exec, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 07/32] introduce QEMUAccel and fill it with interrupt specific driver, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 06/32] split kqemu_init into two, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 08/32] init env made accel driver, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 09/32] wrap cache flushing functions into accel drivers, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 13/32] move disabling code to kqemu.c instead of vl.c, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 15/32] wrap modify_page through accel calls, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 18/32] provide --accel option, Glauber Costa, 2008/10/23