WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Question about xc_ptrace and PV domU process memory map.
From: Necrosoft <necrosoft82@xxxxxxxx>
Date: Sat, 10 Nov 2007 00:09:58 +0100
Delivery-date: Fri, 09 Nov 2007 15:08:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060427 Debian/1.7.13-0ubuntu04.10
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

<Prev in Thread] Current Thread [Next in Thread>