From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sai Suresh Subject: Re: accessing domain's page contents from hypervisor Date: Thu, 12 May 2005 10:45:18 -0500 Message-ID: References: Reply-To: Sai Suresh Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1951829295==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1951829295== Content-Type: multipart/alternative; boundary="----=_Part_6979_21578612.1115912718375" ------=_Part_6979_21578612.1115912718375 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Actually, I was passing the machine address in that variable :) I was using= =20 the code to debug, and didnt bother to change the variable name. Its type i= s=20 unsigned long. It seems to contain a valid machine address, as it fell in= =20 the range between alloc_start and alloc_end that is allocated to a domain. On 5/12/05, Ian Pratt wrote: >=20 >=20 > > 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. >=20 > map_domain_mem takes a machine address >=20 > Ian >=20 > > /*----------------------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) =3D=3D > > PGT_l1_page_table){ > > > > pg =3D (unsigned long *) map_domain_mem(domain_id); > > for(i=3D0; i<1024; i++) { > > if( ( pg !=3D NULL) && (pg[i] & 0x00000041) ) > > count++; > > } > > } > > unmap_domain_mem(pg); > > } > > /*----------------------code---end------------------------------*/ > > > > > ------=_Part_6979_21578612.1115912718375 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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@cl.cam.ac.uk> wrote:

> I was trying to read the contents of a domain's L1 page table
&= gt; 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 mac= hine address

Ian

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

------=_Part_6979_21578612.1115912718375-- --===============1951829295== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1951829295==--