From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hc22g-0003Yo-NA for qemu-devel@nongnu.org; Thu, 12 Apr 2007 12:21:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hc22f-0003YV-Rv for qemu-devel@nongnu.org; Thu, 12 Apr 2007 12:21:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hc22f-0003YR-Jc for qemu-devel@nongnu.org; Thu, 12 Apr 2007 12:21:01 -0400 Received: from agogare.doit.wisc.edu ([144.92.197.211]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Hc1yU-00023x-6T for qemu-devel@nongnu.org; Thu, 12 Apr 2007 12:16:42 -0400 Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JGE008097VQMB00@smtpauth2.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:16:38 -0500 (CDT) Received: from [146.151.107.38] (eh-104-107-38.resnet.wisc.edu [146.151.107.38]) by smtpauth2.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JGE006487VPFD80@smtpauth2.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:16:37 -0500 (CDT) Date: Thu, 12 Apr 2007 11:16:35 -0500 From: eady Subject: [Qemu-devel] Saving and restoring CPU state Message-id: <461E5B63.8040906@wisc.edu> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_Gs/CXGU2eLvbYtrVaVRIuw)" 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 This is a multi-part message in MIME format. --Boundary_(ID_Gs/CXGU2eLvbYtrVaVRIuw) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT I'm still looking for any suggestions on how to save and restore the target cpu state from within a custom instruction in op.c. I basically want a custom instruction to save the cpu state to a data structure and then continue on normally, a second custom instruction would then be used to restore the cpu state from the saved data structure at a later time thereby rolling back the execution of the cpu. I've tried saving and restoring env->eip within my custom instructions but this has no effect. Thanks, Nuri --Boundary_(ID_Gs/CXGU2eLvbYtrVaVRIuw) Content-type: message/rfc822; name="[Qemu-devel] Saving and restoring CPU state" Content-disposition: inline; filename="[Qemu-devel] Saving and restoring CPU state" Return-path: Received: from smtp6.wiscmail.wisc.edu (fafnerpvt.doit.wisc.edu [144.92.8.64]) by store2.doit.wisc.edu (Sun Java System Messaging Server 6.2-8.02 (built Dec 21 2006)) with ESMTP id <0JG7009KV84EN3E0@store2.doit.wisc.edu> for eady@wisc.edu; Sun, 08 Apr 2007 16:38:38 -0500 (CDT) Received: from avs-daemon.smtp6.wiscmail.wisc.edu by smtp6.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) id <0JG70030184CX700@smtp6.wiscmail.wisc.edu> for eady@wisc.edu (ORCPT eady@wisc.edu); Sun, 08 Apr 2007 16:38:36 -0500 (CDT) Received: from lists.gnu.org ([199.232.76.165]) by smtp6.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTPS id <0JG700FNU84B0R70@smtp6.wiscmail.wisc.edu> for eady@wisc.edu (ORCPT eady@wisc.edu); Sun, 08 Apr 2007 16:38:35 -0500 (CDT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Haf9Z-0001AF-RE for eady@wisc.edu; Sun, 08 Apr 2007 17:42:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Haf9I-0001A9-W9 for qemu-devel@nongnu.org; Sun, 08 Apr 2007 17:42:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Haf9H-00019x-9c for qemu-devel@nongnu.org; Sun, 08 Apr 2007 17:42:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Haf9H-00019u-6L for qemu-devel@nongnu.org; Sun, 08 Apr 2007 17:42:11 -0400 Received: from agogare.doit.wisc.edu ([144.92.197.211]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Haf5W-0004Ec-6a for qemu-devel@nongnu.org; Sun, 08 Apr 2007 17:38:18 -0400 Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JG70020183Q0Y00@smtpauth2.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Sun, 08 Apr 2007 16:38:14 -0500 (CDT) Received: from [146.151.107.38] (eh-104-107-38.resnet.wisc.edu [146.151.107.38]) by smtpauth2.wiscmail.wisc.edu (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JG7000UC83PQZ00@smtpauth2.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Sun, 08 Apr 2007 16:38:13 -0500 (CDT) Date: Sun, 08 Apr 2007 16:38:14 -0500 From: eady Subject: [Qemu-devel] Saving and restoring CPU state Sender: qemu-devel-bounces+eady=wisc.edu@nongnu.org To: qemu-devel@nongnu.org Errors-to: qemu-devel-bounces+eady=wisc.edu@nongnu.org Reply-to: qemu-devel@nongnu.org Message-id: <461960C6.8010904@wisc.edu> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Precedence: list X-BeenThere: qemu-devel@nongnu.org X-Spam-Score: X-Spam-Report: IsSpam=no, Probability=7%, Hits=__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0 X-Spam-PmxInfo: Server=avs-12, Version=5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.8.142634, SenderIP=199.232.76.165 X-Spam-PmxInfo: Server=avs-9, Version=5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.8.142634, SenderIP=146.151.107.38 X-detected-kernel: Solaris 10 (beta) X-Mailman-Version: 2.1.5 List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Help: List-Id: qemu-devel.nongnu.org User-Agent: Thunderbird 1.5.0.9 (X11/20070104) Original-recipient: rfc822;eady@wisc.edu I'm experimenting a bit with QEMU and am in need of a way to save and restore X86 CPU state including the pc so that the processor state can be rolled back to re execute from the previous point. I've found the functions "cpu_x86_fsave" and "cpu_restore_state" but do not understand them well enough to use them. Does anyone have tips on how to store the processor state in an auxiliary data structure and then restore it at a later point? Thanks Nuri --Boundary_(ID_Gs/CXGU2eLvbYtrVaVRIuw)--