All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: accessing domain's page contents from hypervisor
@ 2005-05-12 10:45 Ian Pratt
  2005-05-12 15:45 ` Sai Suresh
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Pratt @ 2005-05-12 10:45 UTC (permalink / raw)
  To: Sai Suresh, xen-devel

  
> 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------------------------------*/
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: accessing domain's page contents from hypervisor
@ 2005-05-12 10:50 Pradheep K E
  0 siblings, 0 replies; 5+ messages in thread
From: Pradheep K E @ 2005-05-12 10:50 UTC (permalink / raw)
  To: xen-devel

I have seen a very similar situation too. When I tried to dereference
a domain's page from Xen, after mapping it to a virtual address is
Xen, my machine also booted. I think,  this means some locked data
structure is being accessed. Anyone, any ideas?






---------------------------------------------------------------------------------------------------
> Hi,

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.

Thanks,
Sai


/*----------------------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------------------------------*/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* accessing domain's page contents from hypervisor
@ 2005-05-12  8:59 Sai Suresh
  0 siblings, 0 replies; 5+ messages in thread
From: Sai Suresh @ 2005-05-12  8:59 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]

Hi,

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.

Thanks,
Sai


/*----------------------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------------------------------*/

[-- Attachment #1.2: Type: text/html, Size: 1621 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-12 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 10:45 accessing domain's page contents from hypervisor Ian Pratt
2005-05-12 15:45 ` Sai Suresh
2005-05-12 15:57   ` Mark Williamson
  -- strict thread matches above, loose matches on Subject: below --
2005-05-12 10:50 Pradheep K E
2005-05-12  8:59 Sai Suresh

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.