All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] PC value translation from guest VA to host VA.
@ 2014-02-12  7:47 Gaurav Sharma
  2014-02-12 12:12 ` Gaurav Sharma
  0 siblings, 1 reply; 3+ messages in thread
From: Gaurav Sharma @ 2014-02-12  7:47 UTC (permalink / raw)
  To: qemu-devel

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

Can anyone point it out to me where is the pc value translated from guest
virtual address to host virtual address ?

Thanks,
Gaurav

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] PC value translation from guest VA to host VA.
  2014-02-12  7:47 [Qemu-devel] PC value translation from guest VA to host VA Gaurav Sharma
@ 2014-02-12 12:12 ` Gaurav Sharma
  2014-02-13  1:48   ` Hu Tao
  0 siblings, 1 reply; 3+ messages in thread
From: Gaurav Sharma @ 2014-02-12 12:12 UTC (permalink / raw)
  To: qemu-devel

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

To elaborate a bit more ...
If the target is arm, in disas_arm_insn function we fetch the opcode as per
the pc value :
insn = arm_ldl_code(env, s->pc, s->bswap_code)

This PC value i could trace back and see actually come from the cpu
register set for arm regs[15]. which is the pc value.
Is this PC value a target virtual address or the host virtual address ?
How is the translation done ?

Thanks,
Gaurav



On Wed, Feb 12, 2014 at 1:17 PM, Gaurav Sharma <gauravs.2010@gmail.com>wrote:

> Can anyone point it out to me where is the pc value translated from guest
> virtual address to host virtual address ?
>
> Thanks,
> Gaurav
>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] PC value translation from guest VA to host VA.
  2014-02-12 12:12 ` Gaurav Sharma
@ 2014-02-13  1:48   ` Hu Tao
  0 siblings, 0 replies; 3+ messages in thread
From: Hu Tao @ 2014-02-13  1:48 UTC (permalink / raw)
  To: Gaurav Sharma; +Cc: qemu-devel

On Wed, Feb 12, 2014 at 05:42:00PM +0530, Gaurav Sharma wrote:
> To elaborate a bit more ...
> If the target is arm, in disas_arm_insn function we fetch the opcode as per the
> pc value :
> insn = arm_ldl_code(env, s->pc, s->bswap_code)
> 
> This PC value i could trace back and see actually come from the cpu register
> set for arm regs[15]. which is the pc value.
> Is this PC value a target virtual address or the host virtual address ?
> How is the translation done ?

It's target virtual address, translated to target physical address by
softmmu.  Target physical address is mapped to host virtual address by
qemu memory model, see docs/memory.txt.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-13  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12  7:47 [Qemu-devel] PC value translation from guest VA to host VA Gaurav Sharma
2014-02-12 12:12 ` Gaurav Sharma
2014-02-13  1:48   ` Hu Tao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.