Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HhNb4-0003D8-6A for qemu-devel@nongnu.org; Fri, 27 Apr 2007 06:22:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HhNb1-0003CH-B5 for qemu-devel@nongnu.org; Fri, 27 Apr 2007 06:22:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhNb0-0003Bu-Fs for qemu-devel@nongnu.org; Fri, 27 Apr 2007 06:22:34 -0400 Received: from nz-out-0506.google.com ([64.233.162.228]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HhNV9-0007Qw-MD for qemu-devel@nongnu.org; Fri, 27 Apr 2007 06:16:32 -0400 Received: by nz-out-0506.google.com with SMTP id i11so2654337nzi for ; Fri, 27 Apr 2007 03:16:30 -0700 (PDT) Message-ID: <83a4d4ca0704270316k1dbd6681te06eda656568659d@mail.gmail.com> Date: Fri, 27 Apr 2007 12:16:29 +0200 From: "Eduardo Felipe" Subject: Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_113701_32420742.1177668989829" References: <83a4d4ca0704170249l83c5d7bqe0b0f8cc8b5a4a58@mail.gmail.com> <83a4d4ca0704220609m33ebfda7m825dab6d0992be28@mail.gmail.com> <83a4d4ca0704240234q6f8ecf59gbfa91432a2fee08@mail.gmail.com> <83a4d4ca0704260703u78a43f5co11004fc6c98dd49f@mail.gmail.com> 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 ------=_Part_113701_32420742.1177668989829 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > I think I could not explain my question regarding "addl %ebx, (%eax)". > What I wanted to ask was that this instruction also accesses the memory and > I also need to intercept it within a transaction. Incase of "addl %ebx, > (%eax)", Are the functions under "/* CPU memory access without any memory or > io remapping */" called in case of this instruction. Yes. Just look how the instruction is translated into opcodes and you'll see how it works. You can use the -d switch for this. Secondly, there is a function in "exec.c" called "cpu_physical_memory_rw". > Is it easier to hack into this fuction to intercept the memory references. That function is used by emulated hardware devices to interact with memory ( e.g. DMA to write and read memory chunks). Translated guest code does not use it. Regards, Eduardo ------=_Part_113701_32420742.1177668989829 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

I think I could not explain my question regarding "addl %ebx, (%eax)". What I wanted to ask was that this instruction also accesses the memory and I also need to intercept it within a transaction. Incase of "addl %ebx, (%eax)", Are the functions under "/* CPU memory access without any memory or io remapping */" called in case of this instruction.

Yes. Just look how the instruction is translated into opcodes and you'll see how it works. You can use the -d switch for this.

Secondly, there is a function in "exec.c" called "cpu_physical_memory_rw". Is it easier to hack into this fuction to intercept the memory references.

That function is used by emulated hardware devices to interact with memory ( e.g. DMA to write and read memory chunks). Translated guest code does not use it.

Regards,
Eduardo

------=_Part_113701_32420742.1177668989829--