qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Mapping between Host virtual address and guest physical address
@ 2020-02-13 17:35 Muhui Jiang
  2020-02-14 11:31 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Muhui Jiang @ 2020-02-13 17:35 UTC (permalink / raw)
  To: qemu-devel

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

Dear All

I am recently using qemu-system-arm to boot a linux uImage.

I would like to do some dynamic instrumentation on the uncompressed kernel.
It seems that I need to focus on two key points.

Firstly, I need to know when the kernel is uncompressed, which means the
compression process is finished. By analyzing the vmlinux.elf  and the
trace I can figure it out.

Secondly, I need to know where the uncompressed is, which means where the
uncompressed linux kernel (Before translated into tcg) stores in the
virtual address of qemu. Does anyone have ideas? Many Thanks

Regards
Muhui

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

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

* Re: Mapping between Host virtual address and guest physical address
  2020-02-13 17:35 Mapping between Host virtual address and guest physical address Muhui Jiang
@ 2020-02-14 11:31 ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Dr. David Alan Gilbert @ 2020-02-14 11:31 UTC (permalink / raw)
  To: Muhui Jiang; +Cc: qemu-devel

* Muhui Jiang (jiangmuhui@gmail.com) wrote:
> Dear All
> 
> I am recently using qemu-system-arm to boot a linux uImage.
> 
> I would like to do some dynamic instrumentation on the uncompressed kernel.
> It seems that I need to focus on two key points.
> 
> Firstly, I need to know when the kernel is uncompressed, which means the
> compression process is finished. By analyzing the vmlinux.elf  and the
> trace I can figure it out.
> 
> Secondly, I need to know where the uncompressed is, which means where the
> uncompressed linux kernel (Before translated into tcg) stores in the
> virtual address of qemu. Does anyone have ideas? Many Thanks

There's are some existing HMP monitor commands for this type of
debugging:

gpa2hpa addr -- print the host physical address corresponding to a guest physical address
gpa2hva addr -- print the host virtual address corresponding to a guest physical address
gva2gpa addr -- print the guest physical address corresponding to a guest virtual address

so I think you're saying you want gpa2hva

Dave

> Regards
> Muhui
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



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

end of thread, other threads:[~2020-02-14 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 17:35 Mapping between Host virtual address and guest physical address Muhui Jiang
2020-02-14 11:31 ` Dr. David Alan Gilbert

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).