]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
tools: Remove xc_map_foreign_batch
authorIan Campbell <ian.campbell@citrix.com>
Thu, 18 Jun 2015 09:52:30 +0000 (10:52 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 12:23:34 +0000 (12:23 +0000)
commitb701ccc8ab35ff63bc4d613ec3c7bafec15aa0ee
tree8a08680a5db5ce6111fd866fb7f58e0d2873dc4a
parent6c767a37825c041369fdce609d46c51bbc07656b
tools: Remove xc_map_foreign_batch

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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_foreign_memory.c
tools/libxc/xc_linux_osdep.c
tools/libxc/xc_minios.c
tools/libxc/xc_netbsd.c
tools/libxc/xc_solaris.c
tools/libxc/xc_vm_event.c
tools/xenmon/xenbaked.c
tools/xenpaging/xenpaging.c
tools/xentrace/xentrace.c