[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Question about quest page table update



Hi,
Recently I am trying to understand the page table update of a guest OS
and I am in some trouble.
Assuming the starting point is the hypercall do_mmu_update(req, count,
done, ...),
req has the struct of {uint64_t ptr; uint64_t val}.

My first question is that. Since the ptr points to the address of the
page table entry to be updated, it is the guest address. Why
the code "gmfn = req.ptr >> PAGE_SHIFT;" can be used to the guest
machine frame number?

Second, what is va from these 3 line of code?
        mfn = mfn_x(gfn_to_mfn(pt_owner, gmfn, &p2mt));
        va = map_domain_page_with_cache(mfn, &mapcache);
        va = (void *)((unsigned long)va +
                           (unsigned long)(req.ptr & ~PAGE_MASK));

Third, is the input argument val a real machine address or the
pseudo-physical address of the guest?

Fourth, I saw a lot of code in xen/arch/x86/mm.c calls the functions
like p2m. What is the relationship between the p2m functions and the
shadow page tables?

Sorry for posting so many questions. Could anyone help to clarifying
them? Thanks.

- Hui

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.