qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU


From: Atif Hashmi
Subject: Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU
Date: Thu, 26 Apr 2007 16:26:12 -0500

Hi Eduardo,

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.

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.

Thanks,
Atif

On 4/26/07, Eduardo Felipe <address@hidden> wrote:


2007/4/25, Atif Hashmi <address@hidden>:
Instructions like addl %ebx, (%eax) are also considered to be memory refernce instructions. Do these type of instructions also refer to the functions that you mentioned.

No. You are using __asm_volatile("mov %al %al") to mark the start of your transaction and __asm_volatile("mov %bl %bl") to mark the end. What I meant is that your compiler could generate mov %al,%al or mov %bl,%bl in any other place for whatever reason when it compiles C code. Also your guest OS or any other program running in it can use these two instructions too. Both cases would affect in what you intend to do.

Secondly, what is the purpose of undef ASM_SOFTMMU

If ASM_SOFTMMU is defined, pure assembly memory access routines are used (faster). If it is not defined, alternative C routines are used, which are slower but easier to modify.

Regards,
Eduardo
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]