From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNSBT-0004zN-Ek for qemu-devel@nongnu.org; Fri, 20 May 2011 12:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNSBR-0003HW-RK for qemu-devel@nongnu.org; Fri, 20 May 2011 12:04:15 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:34607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNSBR-0003HG-OG for qemu-devel@nongnu.org; Fri, 20 May 2011 12:04:13 -0400 Received: by qyk36 with SMTP id 36so374132qyk.4 for ; Fri, 20 May 2011 09:04:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Fri, 20 May 2011 19:03:53 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 2/2][SPARC] Fix TA0_Shutdown feature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julien Grall Cc: qemu-devel@nongnu.org, Fabien Chouteau On Wed, May 18, 2011 at 4:17 PM, Julien Grall wrote: > On Tue, May 17, 2011 at 9:57 PM, Blue Swirl wrote: >> On Tue, May 17, 2011 at 6:32 PM, Julien Grall wrote: >>> Fix TA0_SHUTDOWN feature >> >> But what would be the bug? > > We try to add RTEMS's support on leon platform for QEMU. RTEMS uses > software trap 0 for various syscall. > The current implementation of TA0_SHUTDOWN breaks the RTEMS boot. > >> No, this would actually be just opposite to how QEMU works. >> Performance comes from doing more work at translation time in order to >> save time during executing the generated code. > > I agree, this solution slows down the execution, but I didn't find > another solution to fix this bug. You should retain the feature check in translate.c but add a leon specific helper in place of helper_shutdown, which can check for psret. It would be also possible to generate code for the psret check if the helper overhead were an issue.