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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx, Sai Suresh <saisuresh@xxxxxxxxx>
Subject: Re: [Xen-devel] accessing domain's page contents from hypervisor
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 12 May 2005 16:57:12 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Thu, 12 May 2005 16:03:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b3acd07605051208452dea8cf6@xxxxxxxxxxxxxx>
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>
Organization: University of Cambridge
References: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3FA0@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <b3acd07605051208452dea8cf6@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8
Are you sure you weren't passing a domain "physical" address rather than a 
real "machine" address?

Cheers,
Mark

On Thursday 12 May 2005 16:45, Sai Suresh wrote:
> 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