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

Re: [Xen-devel] Why does xc_map_foreign_range() refuse to map pfns below 1M from a domU



On Tue, 2013-12-03 at 17:59 +0200, Razvan Cojocaru wrote:
> >> The Linux domU is perfectly able to map (using xc_map_foreign_range())
> >> pages from the Windows domU, except for pages below 1M.
> >
> > With no XSM how does it have the privilege to do this?
> 
> What I meant to say is that the domU is being allowed to do this sort
> of thing, i.e. the problem is definitely not caused by XSM.

OK, so XSM is involved but you are 101% certain that it is not
preventing the mappings?

> 
> >>  For pages
> >> below 1M, it returns "invalid argument". The same code, trying to map
> >> the exact same pages, does succeed, however, if the application trying
> >> to map those pages runs from dom0.
> >
> > For dom0 it works because by default dom0 has the foreign mapping
> > privilege.
> 
> OK, and can the foreign mapping privilege be extended to the domU so
> that it can go about mapping pages under 1M?

AFAIK the foreign mapping privilege should already allow this. You have
just uncovered a bug somewhere. I'm afraid I don't know where, it might
be in your code, in libxc, in the privcmd ioctl driver or in the
hypervisor.

You probably need to instrument things up down the call stack to find
out where these attempts are getting rejected.

>  Is there some way this
> can be achieved with xl, or even by hacking the HV source code
> somehow?

You need to diagnose and fix the bug I think.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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