All of lore.kernel.org
 help / color / mirror / Atom feed
From: Necrosoft <necrosoft82@alice.it>
To: xen-devel@lists.xensource.com
Subject: Question about xc_ptrace and PV domU process memory map.
Date: Sat, 10 Nov 2007 00:09:58 +0100	[thread overview]
Message-ID: <4734E8C6.2050703@alice.it> (raw)

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

             reply	other threads:[~2007-11-09 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 23:09 Necrosoft [this message]
2007-11-12 15:59 ` Question about xc_ptrace and PV domU process memory map Ian Jackson
     [not found] <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
2007-11-13 13:49 ` Necrosoft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4734E8C6.2050703@alice.it \
    --to=necrosoft82@alice.it \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.