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

[Xen-devel] [Minios-devel] [PATCH v8 0/<VARIOUS>] Begin to disentangle libxenctrl and provide some stable libraries



In <1431963008.4944.80.camel@xxxxxxxxxx> I proposed stabilising some
parts of the libxenctrl API/ABI by disaggregating into separate
libraries.

This is v8 of that set of series against:
ÂÂÂÂxen
ÂÂÂÂqemu-xen
ÂÂÂÂqemu-xen-traditional
ÂÂÂÂmini-os

NB: Samuel+minios-devel will only get the mini-os side and Stefano+qemu
-devel the qemu-xen side.

The code for all repos can be found in:

git://xenbits.xen.org/people/ianc/libxenctrl-split/xen.gitÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂv8
git://xenbits.xen.org/people/ianc/libxenctrl-split/qemu-xen.gitÂÂÂÂÂÂÂÂÂÂÂÂÂv8
git://xenbits.xen.org/people/ianc/libxenctrl-split/qemu-xen-traditional.git v8
git://xenbits.xen.org/people/ianc/libxenctrl-split/mini-os.gitÂÂÂÂÂÂÂÂÂÂÂÂÂÂv8

The tip of the xen.git branch contains an extra patch hacking Config.mk
to point to all the others above, which should get the correct things for
the HEAD of the branch, but not further back in time.

The new libraries here are:

Â* libxentoollog: Common logging infrastructure (already in tree)
Â* libxenevtchn: Userspace access to evtchns (via /dev/xen/evtchn etc)
Â* libxengnttab: Userspace access to grant tables (via /dev/xen/gnt??? etc)
Â* libxencall: Making hypercalls (i.e. the IOCTL_PRIVCMD_HYPERCALL type
ÂÂÂfunctionality)
Â* libxenforeignmemory: Privileged mappings of foreign memory
ÂÂÂ(IOCTL_PRIVCMD_MMAP et al)

The first three were actually pretty distinct within libxenctrl already and
have not changed in quite some time.

Although the other two are somewhat new they are based on top of long
standing stable ioctls, which gives me some confidence.

Nonetheless I would appreciate extra review of at least the interface
headers of all of these with a particular eye to the suitability of these
interfaces being maintained in an ABI (_B_, not _P_) stable way going
forward.

Still to come would be libraries for specific out of tree purposes
(device model, kexec), which would be adding new library at the same
level as libxc I think, rather than underneath, i.e. also using the
libraries split out here, but hopefully not libxenctrl itself.

The new libraries use linker version-scripts to hopefully make future
ABI changes be possible in a compatible way.

Since last time:

 * Some early bits went in.
 * Rebased
 * Clean up the *.so in clean, added distclean targets to each lib
 * On the QEMU side use CONFIG_XEN_CTRL_INTERFACE_VERSION == 471 as the
   gate for this new setup (dropped a Reviewed-by).

Even with the dropped acks mini-os and qemu-xen-trad are fully acked (by
Samuel+Wei and Ian J respectively), while qemu-xen and xen are mostly acked
(but had a few dropped acks since last time).

Summary for qemu-xen.git:
 R      xen_console: correctly cleanup primary console on teardown.
 R      xen: Switch to libxenevtchn interface for compat shims.
 R      xen: Switch to libxengnttab interface for compat shims.
 R      xen: Switch uses of xc_map_foreign_range into xc_map_foreign_pages
  M     xen: Switch uses of xc_map_foreign_{pages,bulk} to use 
libxenforeignmemory API.
  M     xen: Use stable library interfaces when they are available.
A       xen: domainbuild: reopen libxenctrl interface after forking for domain 
watcher.
 R      xen: make it possible to build without the Xen PV domain builder

(A == Acked by Stefano, R == Reviewed by Stefano, M == Modified in v8)

NB: qemu-xen-traditional.git, mini-os.git and xen.git are intertwined, but
the qemu-xen.git part is independent and should be applied after all the
rest of these series.

Summary for xen.git:

 W      tools/libxc: Remove osdep indirection for xc_evtchn
MWI     tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn.
 W      tools: Arrange to check public headers for ANSI compatiblity
 W      tools/libxc: Remove osdep indirection for xc_gnt{shr,tab}
MW      tools: Refactor /dev/xen/gnt{dev,shr} wrappers into libxengnttab.
 W    S tools/libxc: Remove osdep indirection for privcmd
MW      tools: Refactor hypercall calling wrappers into libxencall.
 W      tools/libxc: drop xc_map_foreign_bulk_compat wrappers
 W   G  tools: Remove xc_map_foreign_batch
 W      tools: Implement xc_map_foreign_range(s) in terms of common helper
MWI     tools: Refactor foreign memory mapping into libxenforeignmemory
 WI     tools/libs/foreignmemory: provide xenforeignmemory_unmap.
 WI     tools/libs/foreignmemory: use size_t for size arguments.
        tools/libs/foreignmemory: Mention restrictions on fork in docs.
 WI     tools/libs/foreignmemory: Support err == NULL to map.
 WI     tools/libs/foreignmemory: pull array length argument to map forward
 WI     tools/libs/evtchn: Review and update doc comments.
N       tools/libs/evtchn: Use uint32_t for domid arguments
 W      tools/libs: Clean up hard tabs.
    D   tools/libs/gnttab: Extensive updates to API documentation.
 W      tools/libs/call: Update some log messages to not refer to xc.
 WIR    tools/libs/call: Describe return values and error semantics for xencall*
 W      tools/libs/call: Avoid xc_memalign in netbsd and solaris backends
        tools/libs/call: linux: touch newly allocated pages after madvise 
lockdown
        tools/libs/{call,evtchn}: Document requirements around forking.
M  R    tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD
 W      tools: Update CFLAGS for qemu-xen to allow it to use new libraries
N       tools/libs/*: Introduce APIs to restrict handles to a specific domain.

N == New in v8
W == Acked by Wei
R == Acked by Roger
I == Acked by Ian J
D == Acked by Daniel
G == Acked by George
S == Acked by Dave (Scott)
M == Modified (in all cases minor enough that I didn't drop acks)

Therefore needing attention from Ian and/or Wei are:

        tools/libs/foreignmemory: Mention restrictions on fork in docs.
N       tools/libs/evtchn: Use uint32_t for domid arguments
    D   tools/libs/gnttab: Extensive updates to API documentation.
        
tools/libs/call: linux: touch newly allocated pages after madvise l
        
tools/libs/{call,evtchn}: Document requirements around forking.
   R    
tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD
N       tools/libs/*:
Introduce APIs to restrict handles to a specific doma

The whole thing has been build tested on Linux (incl stubdoms), and on
FreeBSD. I have runtime tested on Linux with qemu-xen, qemu-xen-trad and
stubdoms.

Neither NetBSD nor Solaris have been tested at all. It's certainly not
impossible that I've not got the #includes in the new files quite right.

http://xenbits.xen.org/people/ianc/libxenctrl-split/v8.html is the document
I've been using to try and track what I'm doing. It may not be all that
useful. The history of it is in the v8-with-doc branch of the xen.git
linked to above.

Ian.


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

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