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

Re: [Xen-devel] [Xen-Devel] [PATCH] [GSOC14] refactored mempaging code from xenpaging to libxc.



xc_map_foreign_bulk will return -1 if there is a global error, and set errno appropriately (currently, EFAULT).

If any of the target pfns are paged out, it will return -ENOENT. Otherwise it returns zero. *But*, even though it returned zero, you need to check the individual entries in the err array for mapping error codes for each pfn.

In other words, for your case, if rc == 0 and *err == 0 you are ok.

Andres



On Fri, Jun 13, 2014 at 7:23 AM, Dushyant Behl <myselfdushyantbehl@xxxxxxxxx> wrote:
This is the updated patch, Please have a look and provide feedback.
I have also created a new patch to be applied on top of this which
will replace the call to deprecated function xc_map_foreign_batch with
the call to xc_map_foreign_bulk.
I think that the interface to both functions is same but they report
error in different ways, where xc_map_foreign_bulk sets errno in err
argument. I am not able to find out how to decode the errno to
get the error messages, If you could please point me how to check
which errno corresponds to which error then i'll send the next patch
right after this.

Also, The arguments are properly aligned with xc_interface in the
patch and the source code, maybe the misalignment here is caused in
between somewhere.

> +int xc_mem_paging_ring_setup(xc_interface *xch, domid_t domain_id,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âvoid *ring_page, int *port,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âuint32_t *evtchn_port,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âxc_evtchn **xce_handle,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âmem_event_back_ring_t *back_ring)

Thanks,
Dushyant Behl

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