ZelluX
2009-Jul-30 07:24 UTC
[Xen-devel] Given a mfn, how to tell whether it is a guest page or not?
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? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2009-Jul-30 14:03 UTC
Re: [Xen-devel] Given a mfn, how to tell whether it is a guest page or not?
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@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
ZelluX
2009-Jul-30 14:17 UTC
Re: [Xen-devel] Given a mfn, how to tell whether it is a guest page or not?
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? On Thu, Jul 30, 2009 at 10:03 PM, Tim Deegan <Tim.Deegan@citrix.com> 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@citrix.com> > Principal Software Engineer, Citrix Systems (R&D) Ltd. > [Company #02300071, SL9 0DZ, UK.] >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2009-Jul-30 14:26 UTC
Re: [Xen-devel] Given a mfn, how to tell whether it is a guest page or not?
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? Tim.> On Thu, Jul 30, 2009 at 10:03 PM, Tim Deegan <Tim.Deegan@citrix.com<mailto:Tim.Deegan@citrix.com>> 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@citrix.com<mailto:Tim.Deegan@citrix.com>> > Principal Software Engineer, Citrix Systems (R&D) Ltd. > [Company #02300071, SL9 0DZ, UK.] > > >-- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel