qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Prathmesh Kallurkar <prathmesh.kallurkar@gmail.com>
To: Steven <wangwangkang@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Qemu memory operations
Date: Wed, 15 Aug 2012 14:27:04 +0530	[thread overview]
Message-ID: <CAF_r1AYi1vawSTeZNgJbcXsdkJzfaJ_txTsA9j-7oPf4KDqRoA@mail.gmail.com> (raw)
In-Reply-To: <CAMTrTqXd3cSrkrxTXU+qo5xBhx0+oUDGLuMYzRMV5KK9-XX1PQ@mail.gmail.com>

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

1. Did you get the guest physical address for the load/store instructions?
No, I am getting the guest virtual address for the load and store
instructions.



> 2. The code you pasted seems translated code. The number of input code
> could be smaller than this. So don't you think we should trap the
> input code, instead of the translated code?
>

I am trapping the guest code and NOT the translated code.  For this I am
transferring the guest instruction bytes (using ldub_code) to a remote
disassembler and then inspecting the instruction.


> > cmp ecx, [r12+0x4]
> > mov r10b, [r13+0x0]
> > mov byte [rax+0xf0000], 0x0
> > mov byte [rax+rdx], 0x0
>

The above instructions are instructions of a i386 guest system.

>
> 3. Suppose that I have a tb block which has only one instruction to be
> translated
>             mov    0x4(%esp),%edx
>     I tried to calculate the guest physical address of 0x4(%esp) in
> the above in the function of disas_insns(...), is this possible? Or do
> you have any other solutions?
>

Sorry but seems I have not considered this case. See, I am just trapping
the calls to tcg_gen_qemu_ld/st and then checking my coverage by inspecting
the decoded instructions given by my disassembler. I flag an error when I
receive an instruction which was supposed to contain a load/store
instruction but  I could not trace one. I will definitely see what I get
for *mov    0x4(%esp),%edx*


-- 
Regards,
Prathmesh Kallurkar <http://www.cse.iitd.ernet.in/%7Eprathmesh>

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

  reply	other threads:[~2012-08-15  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 16:31 [Qemu-devel] Qemu memory operations Prathmesh Kallurkar
2012-08-14 11:58 ` Prathmesh Kallurkar
2012-08-14 18:44   ` Blue Swirl
2012-08-14 21:17 ` Steven
2012-08-15  8:57   ` Prathmesh Kallurkar [this message]
2012-08-15 17:21     ` Steven

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=CAF_r1AYi1vawSTeZNgJbcXsdkJzfaJ_txTsA9j-7oPf4KDqRoA@mail.gmail.com \
    --to=prathmesh.kallurkar@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wangwangkang@gmail.com \
    /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).