[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [Patch][RFC] fix xc_ptrace_core for gdbserver-xen on?x86_64.
Hi, Horms > >It seems generaly consistent with the i386 code, and looks generaly >fine, though I am not an expert on x86_64 either. > >There seem to be three distinct portions of your patch. > >1. Make nr_pages an unsigned long instead of a long > > This seems like it should be a separate patch as its really > a trivial (but probably important) bugfix. Right? > Yes, This is trivial bugfix. >2. Fill in map_domain_va_core() for x86_64 > >3. Get rid of m2p_array. > > I'm not sure what the relationship between 2 and 3 is. > Is m2p_array no longer needed because of the changes in 2? > Or is it a separate cleanup? Yes, separate cleanup. m2p_array for x86_64 is very big. So I fix the code with the following way. @@ -20,11 +19,18 @@ static unsigned long static unsigned long map_mtop_offset(unsigned long ma) { - return pages_offset + (m2p_array[ma >> PAGE_SHIFT] << PAGE_SHIFT); - return 0; -} - - + + unsigned long page_num; + for(page_num=0; page_num <nr_pages; page_num++){ + if((ma >> PAGE_SHIFT) == p2m_array[page_num]) + break; + } + + return pages_offset + (page_num << PAGE_SHIFT); +} + + The way get page number of ma by searching the p2m_array without m2p_array. Best Regards, Akio Takebe _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |