[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Question about xc_ptrace and PV domU process memory map.



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.