From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JpYly-0005HA-HZ for qemu-devel@nongnu.org; Fri, 25 Apr 2008 21:00:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JpYlw-0005EQ-Ja for qemu-devel@nongnu.org; Fri, 25 Apr 2008 21:00:13 -0400 Received: from [199.232.76.173] (port=33097 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpYlw-0005EI-9p for qemu-devel@nongnu.org; Fri, 25 Apr 2008 21:00:12 -0400 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JpYlv-0007rL-Qd for qemu-devel@nongnu.org; Fri, 25 Apr 2008 21:00:12 -0400 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080426010335.NREE17818.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Sat, 26 Apr 2008 02:03:35 +0100 Received: from implementation.famille.thibault.fr ([82.21.96.230]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080426010719.DAXH26699.aamtaout03-winn.ispmail.ntl.com@implementation.famille.thibault.fr> for ; Sat, 26 Apr 2008 02:07:19 +0100 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.69) (envelope-from ) id 1JpYls-00053V-Bl for qemu-devel@nongnu.org; Sat, 26 Apr 2008 03:00:08 +0200 Date: Sat, 26 Apr 2008 02:00:08 +0100 From: Samuel Thibault Message-ID: <20080426010007.GB4792@implementation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] kernel kqemu and interrupt handler 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, I'm trying to make GNU Mach work with -kernel-kqemu, and the only problem I'm having is with IRQ handling while from kernel context: the handler roughly does entry: cld pushl %ds pushl %es pushl %fs pushl %gs etc. call handler popl %gs popl %fs popl %es popl %ds I get a General protection fault on popl %gs. Looking at the stack shows me that pushl %gs has pushed 0x13 instead of 0x10. While I understand why this is so (we're running in CPL 3 anyway), I wonder how this is supposed to work, and even more, how linux works (since it roughly does the same)... Samuel