Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfdBo-0006ZC-NN for qemu-devel@nongnu.org; Wed, 10 Oct 2007 11:09:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfdBk-0006V6-5B for qemu-devel@nongnu.org; Wed, 10 Oct 2007 11:09:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfdBk-0006Us-0j for qemu-devel@nongnu.org; Wed, 10 Oct 2007 11:09:32 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IfdBj-0005er-Hh for qemu-devel@nongnu.org; Wed, 10 Oct 2007 11:09:31 -0400 From: Clemens Kolbitsch Date: Wed, 10 Oct 2007 17:09:27 +0200 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200710101709.27112.clemens.kol@gmx.at> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] i386 page fault recovery / user-code continuation 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 hi everyone! I have a question concerning how i386 execution is continued after a page fault has occured... What I have understood so far: In the executing TB the TLB is checked and if the address is not found __ld**** (e.g. __ldl_user) is called. this calls lb_fill (if it really has to) which in turns asks cpu_x86_handle_mmu_fault if it is really a page fault or just a TLB miss... if it is a fault however, tb_find_pc finds the TB and its last assembler instruction and uses raise_exception_err to jump to the main-loop and handle the fault there --- I hope this is correct so far :-) My question now: where does the execution continue after the fault has been handled? the saved assembler-instruction is the instruction AFTER "call __ldl_user" , what does not really make sense to jump back to... Does "cpu_restore_state" find out what the last executing, translated op-code was, restores that and continues at the BEGINNING of that op-code TB?? If someone could help me out on this, it'd be really appreciated ;-) Thanks!!!