[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mapping memory into a domain



On Sun, May 04, 2025 at 07:24:46PM -0400, Demi Marie Obenour wrote:
> On 5/4/25 6:56 PM, Andrew Cooper wrote:
> > On 04/05/2025 11:51 pm, Demi Marie Obenour wrote:
> >> What are the appropriate Xen internal functions for:
> >>
> >> 1. Turning a PFN into an MFN?
> >> 2. Mapping an MFN into a guest?
> >> 3. Unmapping that MFN from a guest?
> >>
> >> The first patch I am going to send with this information is a documentation
> >> patch so that others do not need to figure this out for themselves.
> >> I remember being unsure even after looking through the source code, which
> >> is why I am asking here.
> > 
> > See the top of xen/include/xen/mm.h which has an overview of
> > terminology, including an explanation of why Xen doesn't know what the
> > guest thinks of as PFN.
> I read that and am still confused.  Are you specifically referring to PV
> guests?  For PVH and HVM guests, Xen needs to know what the guest’s PFNs
> are so that it can correctly set up its own page tables.

The term PFN on PVH and HVM is confusing, and IMO it shouldn't be used
in that context.  PFNs should only be used in PV domains context.

I'm afraid I cannot understand the question in your last sentence.
What's "its own page tables"?  Are you referring to the domain second
stage translation page-tables, iow: the p2m?  Or is it something
else?

Regards, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.