Skip to contentSkip to conversation

Given a mfn, how to tell whether it is a guest page or not?

DISCUSSION ZelluX 2 participants 4 messages Jul 30, 2009

lore
Share & tools
lore
#1 lore raw
Quoted 1 line · ZelluX

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.

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]
author
#2 lore raw

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?

Quoted 6 lines · Tim Deegan
Quoted 1 line · ZelluX

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.

Quoted 9 lines

Cheers,

Tim.

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 2 lines · ZelluX

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.

Quoted 17 lines · On Thu, Jul 30, 2009 at 10:03 PM, Tim Deegan…
Quoted 1 line · ZelluX

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 <[email protected]<mailto:[email protected]>> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]