Skip to contentSkip to conversation

xc_map_foreign_range()

DISCUSSION Adam Thorsen 2 participants 2 messages Mar 2, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I am using the xc_map_foreign_range() function to attempt to map memory from a guest domain into Domain 0. I am guessing that the value named mfn indicates the page in the guest domain that I wish to start mapping from.

If this assumption is correct, how do I get a value for mfn? Say for instance, that I wanted to map the kernel running in the guest domain? How about a specific process?

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw

MFN = Machine Frame Number i.e. the frame number in the *real* machine memory, rather than the domain pseudophysical address.

Quoted 3 lines

If this assumption is correct, how do I get a value for mfn? Say for instance, that I wanted to map the kernel running in the guest domain? How about a specific process?

It depends what you're doing...

If you're mapping some sort of device channel that talks to a driver in the guest, you'd want the guest to pass you the MFN number (obtained using e.g. "virt_to_machine() >> PAGE_SHIFT") using a control message or some other out-of-band means.

I think the control tools use some kind of hypercall to find out the list of pages owned by a domain for operations (e.g. for suspend / resume / domain building).

There may be other things you could try but rather than speculating, I'll leave it up to others. What exactly are you trying to achieve?

Cheers,
Mark

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click