From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNBbK-0001kG-RO for qemu-devel@nongnu.org; Wed, 14 Jan 2009 14:40:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNBbK-0001jm-0L for qemu-devel@nongnu.org; Wed, 14 Jan 2009 14:40:30 -0500 Received: from [199.232.76.173] (port=56192 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNBbJ-0001ja-Rs for qemu-devel@nongnu.org; Wed, 14 Jan 2009 14:40:29 -0500 Received: from savannah.gnu.org ([199.232.41.3]:60448 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNBbJ-0006Xu-Ef for qemu-devel@nongnu.org; Wed, 14 Jan 2009 14:40:29 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LNBbI-0000w2-PL for qemu-devel@nongnu.org; Wed, 14 Jan 2009 19:40:28 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LNBbI-0000vw-DT for qemu-devel@nongnu.org; Wed, 14 Jan 2009 19:40:28 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Wed, 14 Jan 2009 19:40:28 +0000 Subject: [Qemu-devel] [6305] Get rid of user_mode_only Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6305 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6305 Author: aurel32 Date: 2009-01-14 19:40:27 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Get rid of user_mode_only Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/bsd-user/main.c trunk/cpu-defs.h trunk/cpu-exec.c trunk/darwin-user/main.c trunk/linux-user/main.c trunk/target-sparc/helper.c trunk/tests/qruncom.c Modified: trunk/bsd-user/main.c =================================================================== --- trunk/bsd-user/main.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/bsd-user/main.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -558,7 +558,6 @@ init_task_state(ts); ts->info = info; env->opaque = ts; - env->user_mode_only = 1; #if defined(TARGET_SPARC) { Modified: trunk/cpu-defs.h =================================================================== --- trunk/cpu-defs.h 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/cpu-defs.h 2009-01-14 19:40:27 UTC (rev 6305) @@ -201,8 +201,6 @@ jmp_buf jmp_env; \ int exception_index; \ \ - int user_mode_only; \ - \ void *next_cpu; /* next CPU sharing TB cache */ \ int cpu_index; /* CPU index (informative) */ \ int running; /* Nonzero if cpu is currently running(usermode). */ \ Modified: trunk/cpu-exec.c =================================================================== --- trunk/cpu-exec.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/cpu-exec.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -263,7 +263,8 @@ if (ret == EXCP_DEBUG) cpu_handle_debug_exception(env); break; - } else if (env->user_mode_only) { + } else { +#if defined(CONFIG_USER_ONLY) /* if user mode only, we simulate a fake exception which will be handled outside the cpu execution loop */ @@ -277,7 +278,7 @@ #endif ret = env->exception_index; break; - } else { +#else #if defined(TARGET_I386) /* simulate a real cpu exception. On i386, it can trigger new exceptions, but we do not handle @@ -305,6 +306,7 @@ #elif defined(TARGET_M68K) do_interrupt(0); #endif +#endif } env->exception_index = -1; } Modified: trunk/darwin-user/main.c =================================================================== --- trunk/darwin-user/main.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/darwin-user/main.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -896,7 +896,6 @@ memset(ts, 0, sizeof(TaskState)); env->opaque = ts; ts->used = 1; - env->user_mode_only = 1; #if defined(TARGET_I386) cpu_x86_set_cpl(env, 3); Modified: trunk/linux-user/main.c =================================================================== --- trunk/linux-user/main.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/linux-user/main.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -2421,7 +2421,6 @@ init_task_state(ts); ts->info = info; env->opaque = ts; - env->user_mode_only = 1; #if defined(TARGET_I386) cpu_x86_set_cpl(env, 3); Modified: trunk/target-sparc/helper.c =================================================================== --- trunk/target-sparc/helper.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/target-sparc/helper.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -644,7 +644,6 @@ env->wim = 1; env->regwptr = env->regbase + (env->cwp * 16); #if defined(CONFIG_USER_ONLY) - env->user_mode_only = 1; #ifdef TARGET_SPARC64 env->cleanwin = env->nwindows - 2; env->cansave = env->nwindows - 2; Modified: trunk/tests/qruncom.c =================================================================== --- trunk/tests/qruncom.c 2009-01-14 19:27:02 UTC (rev 6304) +++ trunk/tests/qruncom.c 2009-01-14 19:40:27 UTC (rev 6305) @@ -199,10 +199,6 @@ env = cpu_init("qemu32"); - /* set user mode state (XXX: should be done automatically by - cpu_init ?) */ - env->user_mode_only = 1; - cpu_x86_set_cpl(env, 3); env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;