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

Re: [Xen-devel] [PATCH QEMU-XEN v3 3/8] xen: Switch uses of xc_map_foreign_range into xc_map_foreign_bulk



On Wed, 14 Oct 2015, Ian Campbell wrote:
> On Wed, 2015-10-14 at 15:01 +0100, Stefano Stabellini wrote:
> > On Wed, 7 Oct 2015, Ian Campbell wrote:
> > > In Xen 4.7 we are refactoring parts libxenctrl into a number of
> > > separate libraries which will provide backward and forward API and ABI
> > > compatiblity.
> > > 
> > > One such library will be libxenforeignmemory which provides access to
> > > privileged foreign mappings and which will provide an interface
> > > equivalent to xc_map_foreign_bulk.
> > > 
> > > In preparation for this switch all uses of xc_map_foreign_range to
> > > xc_map_foreign_bulk. 
> > 
> > The sentence is incomplete.
> 
> If you mean "grammatically incorrect" then I don't think it is. Did you
> mean it was missing some information which you hoped to to see? If so then
> which?

Sorry, I read it as:

In preparation for this switch,
all uses of xc_map_foreign_range <missing something> to xc_map_foreign_bulk.

:-)


> > Unfortunately xc_map_foreign_bulk is not that well documented, but I am
> > assuming that the mfn parameter is not supposed to be changed by the
> > function, right?
> 
> Given:
> 
> /**
>  * Like xc_map_foreign_pages(), except it can succeed partially.
>  * When a page cannot be mapped, its respective field in @err is
>  * set to the corresponding errno value.
>  */
> void *xc_map_foreign_bulk(xc_interface *xch, uint32_t dom, int prot,
>                           const xen_pfn_t *arr, int *err, unsigned int num);
> 
> by "the mfn parameter" I suppose you mean arr[0] (for cases where arr is
> passed as &mfn as below)?

that's right


> That's a pointer to an array of const xen_pfn_t so no need to worry about
> it changing, unlike some other interfaces per-page errors are reported via
> the separate err array.

That's what I gathered from the code too, I just wanted to be sure

_______________________________________________
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®.