All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about xc_ptrace and PV domU process memory map.
@ 2007-11-09 23:09 Necrosoft
  2007-11-12 15:59 ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Necrosoft @ 2007-11-09 23:09 UTC (permalink / raw)
  To: xen-devel

Hi

I would use a xc_ptrace function to map a domU page having a guest 
virtual address. I use a PV domain, non HVM.

If I simply call xp_ptrace(xc_handle, PTRACE_PEEKTEXT, 0, virt_address, 
0) (where xc_handle is obtained by xc_handle = xc_interface_open() and 
first 0 is vcpu used) I receive this message:

"Could not allocate memory"

Reading the code I look that this error is caused by map_domain_va 
function (line 365 in xc_ptrace.c XEN 3.1). In this section of code is 
calculated total pages via:

long npgs = xc_get_tot_pages(xc_handle, current_domid);

I think that the error reported above is caused by a wrong value 
returned by xc_get_tot_pages function. In particular I think it is 
current_domid set incorrectly.

In effect current_domid is statically declared but I do not understand 
when and where is initialized.

So, the problem is pass the correct current_domid (in what way?) or I 
mistake something? You can help me?

TNX in advance!

Best regards

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

end of thread, other threads:[~2007-11-13 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
2007-11-13 13:49 ` Question about xc_ptrace and PV domU process memory map Necrosoft
2007-11-09 23:09 Necrosoft
2007-11-12 15:59 ` Ian Jackson

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.