qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Atif Hashmi" <atifhashmi@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU
Date: Tue, 1 May 2007 15:28:40 -0500	[thread overview]
Message-ID: <d5f3bd2b0705011328i947c24fo32e02d2d9e8c5172@mail.gmail.com> (raw)
In-Reply-To: <83a4d4ca0704270316k1dbd6681te06eda656568659d@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1828 bytes --]

Hi Eduardo,

Is it possible to identify context switches inside QEMU. In order to support
transactional memory in QEMU, we have added

target_ulong tm_abort_eip;
int inTransaction;

to CPUX86State structure.

tm_abort_eip is the EIP to jump to when a transaction fails i.e. start of
the Transactional Block while inTransaction tells us whether a transaction
has started so that we can log the memory references. As far as I
understand, env variable will be modified at a context switch. At a context
switch, we need to update tm_abort_eip as well as inTransaction based on the
status of the new thread being loaded. We can store these two variables
inside DisasContext which I believe is unique for each translated block. But
when and where should we modify the env variable so that for each thread it
contains the correct values for tm_abort_eip and inTransaction.

I will appreciate your help.

Thanks,
Atif

On 4/27/07, Eduardo Felipe <edusaper@gmail.com> wrote:
>
>
> > 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
>
>

[-- Attachment #2: Type: text/html, Size: 2581 bytes --]

  reply	other threads:[~2007-05-01 20:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04  4:57 [Qemu-devel] Detecting an assembly instruction in QEMU Atif Hashmi
2007-04-05 17:37 ` [Qemu-devel] " Atif Hashmi
2007-04-06 12:15   ` Eduardo Felipe
2007-04-07 21:06     ` Atif Hashmi
2007-04-08 14:13       ` Eduardo Felipe
2007-04-08 21:38         ` Atif Hashmi
2007-04-08 22:14           ` Eduardo Felipe
2007-04-17  0:17             ` Atif Hashmi
2007-04-17  0:22               ` Atif Hashmi
2007-04-17  9:49                 ` Eduardo Felipe
2007-04-17 20:33                   ` Atif Hashmi
2007-04-22 13:09                     ` Eduardo Felipe
2007-04-24  7:30                       ` Atif Hashmi
2007-04-24  9:34                         ` Eduardo Felipe
2007-04-25 16:21                           ` Atif Hashmi
2007-04-25 16:50                             ` Atif Hashmi
2007-04-26 14:03                               ` Eduardo Felipe
2007-04-26 21:26                                 ` Atif Hashmi
2007-04-27 10:16                                   ` Eduardo Felipe
2007-05-01 20:28                                     ` Atif Hashmi [this message]
2007-04-11 16:05           ` Thiemo Seufer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5f3bd2b0705011328i947c24fo32e02d2d9e8c5172@mail.gmail.com \
    --to=atifhashmi@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).