Re: [Xen-devel] [Minios-devel] [PATCH v8 0/] Begin to disentangle libxenctrl and provide some stable libraries

2016-01-22 Thread Ian Campbell
On Tue, 2016-01-19 at 15:44 +, Ian Campbell wrote:
> On Fri, 2016-01-15 at 13:22 +, Ian Campbell wrote:
> >  
> > 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.
> >    Rtools/libs/*: Use O_CLOEXEC on Linux and FreeBSD
> 
> Thanks to Wei for acking all of these. This set of series is now ready to
> go in, but we've not had a push for a little while and this is
> potentially
> disruptive so I'm going to hold off for now until we get a push.

We've now had a push in 78610 so I'm going to go ahead with applying this
mass of patches today.

> There are one or two patches which will require rebasing over Jeurgens
> introduction of tools/helpers, I'll resend just those ones though (or at
> least only the Xen part of this series).

Ian.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [Minios-devel] [PATCH v8 0/] Begin to disentangle libxenctrl and provide some stable libraries

2016-01-22 Thread Ian Campbell
On Fri, 2016-01-15 at 13:22 +, Ian Campbell wrote:
> In <1431963008.4944.80.ca...@citrix.com> 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

I have now applied all xen, qemu-xen-traditional and mini-os, with the one
patch updated to v9 in the xen series (posted earlier today).

I omitted the final two patches from the Xen side:
[28/29] tools/libs/*: Introduce APIs to restrict handles to a specific domain.
[29/29] HACK: Update Config.mk to pull all the right bits from my xenbits trees

#28 isn't quite ready/agreed yet. (I hope #29 is obvious...)

Stefano, you can go ahead with the qemu-xen part whenever. Maybe it would
be worth waiting for the xen push gate to succeed first though? At least
waiting for a xen-unstable-smoke flight would be wise.

Ian, you weren't around to discuss the qemu-xen-traditional push with, but
I took a gamble that you would be ok with me doing so on this occasion. I
hope that's ok.

I modified the 4 patches with updated MINIOS_UPSTREAM_REVISION and
QEMU_TRADITIONAL_REVISION where called for.

Ian.


___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [Minios-devel] [PATCH v8 0/] Begin to disentangle libxenctrl and provide some stable libraries

2016-01-19 Thread Ian Campbell
On Fri, 2016-01-15 at 13:22 +, Ian Campbell wrote:
> 
> 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

Thanks to Wei for acking all of these. This set of series is now ready to
go in, but we've not had a push for a little while and this is potentially
disruptive so I'm going to hold off for now until we get a push.

There are one or two patches which will require rebasing over Jeurgens
introduction of tools/helpers, I'll resend just those ones though (or at
least only the Xen part of this series).

Ian, I'll coordinate with you IRL regarding the push to the qemu-xen-trad
tree.

> N tools/libs/*: Introduce APIs to restrict handles to a specific doma

It would be nice to either get this in for 4.7 or explicitly decide we
cannot, but I don't think it needs to block the rest of the series.

Ian.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


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

2016-01-15 Thread Ian Campbell
In <1431963008.4944.80.ca...@citrix.com> 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.
 WS 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.
 WIRtools/libs/call: Describe return values and error semantics for xencall*
 W  tools/libs/call: Avoid xc_memalign in netbsd and