From mboxrd@z Thu Jan 1 00:00:00 1970 From: Necrosoft Subject: Question about xc_ptrace and PV domU process memory map. Date: Sat, 10 Nov 2007 00:09:58 +0100 Message-ID: <4734E8C6.2050703@alice.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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