[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] pte query?
On 11/15/05, Aaron J. Marks <ajmarks@xxxxxxxxxxxxxx> wrote: > hi, > > what's the best way (if at all) to iterate through all of a domain's page > tables within xen 2.0.6? i need to find all references to a specific pte > value (which is a given). essentially, a reverse page-table lookup. This is not something you wish to do in a production system, though I can imagine situations where this would be useful for debugging. Basically, you will have to instrument Xen with a n-level nested loop, that does something like (show here for 2-level x86-32 ptes): unsigned long* pgd = map_domain_page(d->arch.mm->pgd) for(i=0; i<HYPERVISOR_VIRT_START>>22; i++) { if( pgd[i] & _PAGE_PRESENT) { unsigned long* ptes = map_domain_page( pgd[i]>>12); for(j=0; j<1024; j++) { if( ptes[j] & _PAGE_PRESENT && ptes[j]>>12==my_mfn) { printk("found it!\n"); } unmap_domain_page(ptes); } } Good luck, Jacob -- Save time and bandwidth with EDelta: http://www.diku.dk/~jacobg/edelta/ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |