[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] machine address
Ok. thank you On Tue, 31 Mar 2015 10:26:06 +0100, George Dunlap wrote: On Mon, Mar 30, 2015 at 3:00 PM, HANNAS YAYA Issa <issa.hannasyaya@xxxxxxxxxxx> wrote:HiWhen there is a page fault the trapper of the page fault in the hypervisoris do_page_fault in xen/arch/x86/traps.c right?That's for PV guests. For HVM guests, the page fault causes a VMEXIT,which will be handled in xen/arch/x86/hvm/vmx/vmx.c:vmx_vmexit_handler() (on Intel).in this funcion i found a method read_cr2() which return the virtual adrressof the page who generate the page fault.My question is : is it possible to get the machine address of the page tableentry for this virtual address?In general the way you have to do that is to use the virtual address to walk the guest's pagetables (exactly the same way the hardware would do on a TLB miss). For HVM guests (or PV guests in shadow mode) there's already code todo walk for you in xen/arch/x86/mm/guest_walk.c:guest_walk(). You can see how it's called from the HAP code and the shadow code if you want.I don't immediately see a walker for PV guests. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |