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

Re: [Xen-devel] [PATCH XEN v6 14/32] tools: Remove xc_map_foreign_batch

On Thu, Dec 03, 2015 at 11:22:11AM +0000, Ian Campbell wrote:
> It can trivially be replaced by xc_map_foreign_pages which is the
> interface I want to move to going forward (by standardising on _bulk
> but handling err=NULL as _pages does).
> The callers of _batch are checking a mixture of a NULL return or
> looking to see if the top nibble of the (usually sole) mfn they pass
> has been modified to be non-zero to detect errors. _pages never
> modifies the mfn it was given (it's const) and returns NULL on
> failure, so adjust the error handling where necessary. Some callers
> use a copy of the mfn array, for reuse on failure with _batch, which
> is no longer necessary as _pages doesn't modify the array, however I
> haven't cleaned that up here.
> This reduces the twist maze of xc_map_foreign_* by one, which will be
> useful when trying to come up with an underlying stable interface.
> NetBSD and Solaris implemented xc_map_foreign_bulk in terms of
> xc_map_foreign_batch via a compat layer, so xc_map_foreign_batch
> becomes an internal osdep for them. New OS ports should always
> implement xc_map_foreign_bulk instead.
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Xen-devel mailing list



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