[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] xen physical addressïpaddrïand machine address (maddr)
On Sun, 2015-06-28 at 13:13 +0800, xinyue wrote: Per http://wiki.xen.org/wiki/Asking_Xen_Devel_Questions#Observe_list_etiquette. please do not cross post. You question seems to be xen-development related, so I have put the other two to bcc. > I wan't to hash the kernel code segment of HVM DomU in Xen > hypervisor, so I have to transilate the virtral address in VM to the > virtral address in xen. Is there some easy ways ? You need to first translate the guest virtual address to a guest physical address and then to a machine address which you can then map in to Xen. I think you need paging_gva_to_gfn for the first step, then one of the get_gfn* functions, then map_domain_page. I don't know if there is a helper which will simplify all this. > I read the source code about memory in Xen and confuse the > relationship between the paddr and maddr. How does HVM with EPT > translate between them. Is paddr the same with virtral address in xen > heap? No. A paddr is a physical address, not a virtual one. The latest xen.git contains a comment in xen/include/xen/mm.h which describes the different types of memory. To get a Xen virtual address for a domheap page you need to use (un)map_domain_page on the underlying machine address (or struct page_info *) to create a temporary mapping. For xenheap pages you can use other mechanisms, but for an arbitrary guest page it is unlikely to be from the xenheap. > > > Thanks for any advices and with best regards! > > > xinyue > > > _______________________________________________ > Xen-users mailing list > Xen-users@xxxxxxxxxxxxx > http://lists.xen.org/xen-users _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |