From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXidj-0008St-FU for qemu-devel@nongnu.org; Mon, 25 Aug 2008 16:26:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXidi-0008RL-39 for qemu-devel@nongnu.org; Mon, 25 Aug 2008 16:26:14 -0400 Received: from [199.232.76.173] (port=56329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXidg-0008Qy-I9 for qemu-devel@nongnu.org; Mon, 25 Aug 2008 16:26:12 -0400 Received: from csl.cornell.edu ([128.84.224.10]:3872 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXidg-0005vs-C3 for qemu-devel@nongnu.org; Mon, 25 Aug 2008 16:26:12 -0400 Received: from stanley.csl.cornell.edu (stanley.csl.cornell.edu [128.84.224.15]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id m7PKQ6CR081386 for ; Mon, 25 Aug 2008 16:26:11 -0400 (EDT) Date: Mon, 25 Aug 2008 16:26:06 -0400 (EDT) From: Vince Weaver Message-ID: <20080825162105.T45325@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Qemu-devel] linux-user exception handling 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 Hello so I'm tracking down a problem on sparc32plus-linux-user. SPARC has register windows, and when it tried to save another register context, but all available ones are full, it causes a TT_SPILL exception. In theory the OS would handle this and move some of the registers to RAM somewhere. In any case, this doesn't seem to be working properly. I've traced through the code, and I find in cpu-exec.c where userspace exceptions are handled. The code involved in listed below. Am I correct in reading that user-mode exceptions are only implemented for x86? If so that makes me sad, because it means that pretty much any SPARC program that has more than 8 nested function calls won't work until a lot more code is implemented. Vince } else if (env->user_mode_only) { /* if user mode only, we simulate a fake exception which will be handled outside the cpu execution loop */ #if defined(TARGET_I386) do_interrupt_user(env->exception_index, env->exception_is_int, env->error_code, env->exception_next_eip); /* successfully delivered */ env->old_exception = -1; #endif ret = env->exception_index; break;