[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V2 PATCH 7/8] pvh dom0: Add and remove foreign pages
On Mon, 25 Nov 2013 14:00:35 -0500 Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote: > On 11/25/2013 04:03 AM, Jan Beulich wrote: > >>>> On 23.11.13 at 01:03, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> > >>>> wrote: > >> +static int xenmem_add_foreign_to_pmap(unsigned long fgfn, > >> unsigned long gpfn, > >> + domid_t foreign_domid) > >> +{ > >> + p2m_type_t p2mt, p2mt_prev; > >> + int rc = 0; > >> + unsigned long prev_mfn, mfn = 0; > >> + struct domain *fdom, *currd = current->domain; > >> + struct page_info *page = NULL; > >> + > >> + if ( currd->domain_id == foreign_domid || foreign_domid == > >> DOMID_SELF || > >> + !is_pvh_domain(currd) ) > >> + return -EINVAL; > >> + > >> + if ( !is_control_domain(currd) || > >> + (fdom = get_pg_owner(foreign_domid)) == NULL ) > >> + return -EPERM; > > > > Is this the right approach (i.e. shouldn't this be an XSM call)? > > Cc-ing Daniel... > > > > Yes, this should be an XSM call; it needs to explicitly check if currd > has the right to access pages from fdom. I thought the control_domain would always have right to access pages from fdoms. If no, can you please give some hints on which xsm call I need to use. Glancing at xsm file, I can't figure quickly.... thanks mukesh _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |