WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Question about quest page table update

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Question about quest page table update
From: Steven <wangwangkang@xxxxxxxxx>
Date: Wed, 19 Oct 2011 22:21:44 -0400
Delivery-date: Wed, 19 Oct 2011 19:22:51 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=jZsBIOcW6ubd9wyZMnmrO33hviu9P4EzN04vsw4sLsk=; b=mfpuxCJetScljvC55pJNu8CMgl10JyLMncWMCvCVeHRMfbrSS98swLOQEDHCDDI8z1 /aJnDiWpVL3YNcW3Ye/Mw/90IjTtrYTVsohrxbukJZXoproV+yFxHW2vBfMG87wHzaUI pKqgRlXpPswoVkQlbeUqwHRbO1SV83Sk07PMU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>