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/
Home Products Support Community News


Re: [Xen-devel] Given a mfn, how to tell whether it is a guest page or n

At 15:17 +0100 on 30 Jul (1248967068), ZelluX wrote:
> I'm reading arch/x86/mm/shadow/multi.c and it seems shadow_page_info struct 
> is used here, which doesn't contain a _domain field. Is there any relation 
> between shadow_page_info and page_info? Are page_info just place holder for 
> shadow_page_info struct here?

Shadow pages used to have a different page_info structure, though that's
no longer true in the latest versions.  Shadow pages are *never* guest
memory, though.  They're owned and managed by Xen and the guest never
even gets read access to them.

If you want to know which guest frame a shadow is a shadow of, look at
the backpointer field in the shadow page_info.  You'll need to check the
count an type fields to make sure it's in use as the right kind of
shadow first, though.

Why do you want to be able to do this, by the way?


> On Thu, Jul 30, 2009 at 10:03 PM, Tim Deegan 
> <Tim.Deegan@xxxxxxxxxx<mailto:Tim.Deegan@xxxxxxxxxx>> wrote:
> At 08:24 +0100 on 30 Jul (1248942251), ZelluX wrote:
> > In shadow mode, how can I know if a mfn is related to a guest page? Is 
> > there any mfn range to tell xen pages from guest pages?
> In any mode, look at the owner field of the page_info struct.
> Cheers,
> Tim.
> --
> Tim Deegan <Tim.Deegan@xxxxxxxxxx<mailto:Tim.Deegan@xxxxxxxxxx>>
> Principal Software Engineer, Citrix Systems (R&D) Ltd.
> [Company #02300071, SL9 0DZ, UK.]

Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

Xen-devel mailing list

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