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

Re: [Xen-devel] accessing domain's page contents from hypervisor


  • To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
  • From: Sai Suresh <saisuresh@xxxxxxxxx>
  • Date: Thu, 12 May 2005 10:45:18 -0500
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 12 May 2005 15:44:51 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rdiaEy/8xB3GAypvKBRNmFP5ZQ0Afc0h4NpVYHzFvQNI0p/8HRQAmJ3ok1Yo9tLTb7IVIyxH1U9JNjx0XgegicOswIlIkQphD6VQHK3Ky0mKlvFWf89HAHZgHVX57iW7BsHBOVspHGKSGFeKS43kym2M2Lo38jlOHW0b3KaPM+s=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Actually, I was passing the machine address in that variable :) I was using the code to debug, and didnt bother to change the variable name. Its type is unsigned long. It seems to contain a valid machine address, as it fell in the range between alloc_start and alloc_end that is allocated to a domain.



On 5/12/05, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote:

> I was trying to read the contents of a domain's L1 page table
> page from hypervisor.
> The system reboots whenever I dereference the contents of a page.
> I use the map_domain_mem and unmap_domain_mem functions
> before and after I dereference it.
> Any suggestions on the possible reasons would be really helpful.

map_domain_mem takes a machine address

Ian

> /*----------------------code---start------------------------------*/
>     unsigned long * pg;
>     int i;
>     list_for_each_entry(page, &d->page_list, list)
>     {
>         if ( (page->u.inuse.type_info & PGT_type_mask) ==
> PGT_l1_page_table){
>
>             pg = (unsigned long *) map_domain_mem(domain_id);
>              for(i=0; i<1024; i++) {
>                 if( ( pg != NULL) &&  (pg[i] & 0x00000041) )
>                 count++;
>               }
>          }
>          unmap_domain_mem(pg);
>      }
> /*----------------------code---end------------------------------*/
>
>

_______________________________________________
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®.