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

Re: [Xen-devel] Mapping pages from dom0



> I am curious: I'm just starting to look into the mechanisms by which pages
> are shared between domains.  The above question surprised me, because I'd
> assumed there existed some sort of anonymous "I want to map a page that
> domain N has exported" method to bootstrap direct interdomain
> communication between unprivileged domains.

To map another domain's memory you have to know the machine address of the 
page frame in question.

> Looking through the code now, could someone please comment on the
> correctness (or, more importantly, uncorrectness) of the following
> statements?

Here goes...

> * It is possible for two unprivileged domains to share pages, without
> needing any intervention from a privileged domain, as long as each side
> knows in advance the addresses of the pages to be shared?

Not yet.  Grant tables should enable this but are not completed yet.  For now, 
you need to be a privileged domain to map another domain's memory.

> * The grant_table_op hypervisor call is used by Domain-A to notify Xen
> that "yes, I want to allow Domain-B to map this page"?  Then, the
> update_va_mapping hypervisor call is used by Domain-B to map the page?

It will be, when the grant tables stuff is finished.

> * grant_table_op cannot be used by Domain-A to revoke Domain-B's mapping
> of the page?  (I.e., all the "unmap grant ref" flag says is "cause all
> future Domain-B update_va_mapping calls, regarding mapping this page, to
> fail"?)

I think the plan is to enable domains to appeal to domain 0 if a mapping that 
should have been relinquished by another domain is not.  Some sort of 
algorithm is then to be used by management code in domain 0 to decide what to 
do about it.

> * Jacob's problem (dom0 needing to know the addresses of pages shared by a
> domU) is avoided during virtual network and virtual block device setup,
> because the pages to be shared are somehow either set up by Xen or shared
> through the "control interface" channel to Xend?

The control interface protocols for each of the device interfaces include a 
message from the frontend that tells Xend where the shared memory frame for 
the device interface's comms ring is placed (in machine addresses).  Xend 
then sends this address to the backend so it knows where the interface ring 
is.

Messages passed over a device interface ring contain machine addresses that 
the backend can use to map the actual IO destination

Cheers,
Mark


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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