From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9BEu-0002sO-Mb for qemu-devel@nongnu.org; Wed, 16 Dec 2015 07:31:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9BEq-0000r2-BQ for qemu-devel@nongnu.org; Wed, 16 Dec 2015 07:31:28 -0500 Received: from smtp.citrix.com ([66.165.176.89]:16902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9BEq-0000qo-5D for qemu-devel@nongnu.org; Wed, 16 Dec 2015 07:31:24 -0500 Message-ID: <1450269007.4053.48.camel@citrix.com> From: Ian Campbell Date: Wed, 16 Dec 2015 12:30:07 +0000 Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [Minios-devel] [PATCH v7 0/] Begin to disentangle libxenctrl and provide some stable libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xen-devel Cc: Wei Liu , Stefano Stabellini , Ian Jackson , qemu-devel@nongnu.org, minios-devel@lists.xenproject.org, samuel.thibault@ens-lyon.org, Roger Pau Monne In <1431963008.4944.80.camel@citrix.com> I proposed stabilising some parts of the libxenctrl API/ABI by disaggregating into separate libraries. This is v7 of that set of series against: =C2=A0=C2=A0=C2=A0=C2=A0xen =C2=A0=C2=A0=C2=A0=C2=A0qemu-xen =C2=A0=C2=A0=C2=A0=C2=A0qemu-xen-traditional =C2=A0=C2=A0=C2=A0=C2=A0mini-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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0v7 git://xenbits.xen.org/people/ianc/libxenctrl-split/qemu-xen.git=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0v7 git://xenbits.xen.org/people/ianc/libxenctrl-split/qemu-xen-traditional.git= v7 git://xenbits.xen.org/people/ianc/libxenctrl-split/mini-os.git=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0v7 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: =C2=A0* libxentoollog: Common logging infrastructure =C2=A0* libxenevtchn: Userspace access to evtchns (via /dev/xen/evtchn etc) =C2=A0* libxengnttab: Userspace access to grant tables (via /dev/xen/gnt???= etc) =C2=A0* libxencall: Making hypercalls (i.e. the IOCTL_PRIVCMD_HYPERCALL typ= e =C2=A0=C2=A0=C2=A0functionality) =C2=A0* libxenforeignmemory: Privileged mappings of foreign memory =C2=A0=C2=A0=C2=A0(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: * Lots more docs updates based on feedback given and especially the discussion around the semantics of the libraries wrt forking without exec. * s/gnttab_munmap/gnttab_unmap/ and s/gntshr_munmap/gntshr_unshare/ =C2=A0= =C2=A0 =C2=A0 =C2=A0in the libxengnttab API. * Use O_CLOEXEC on Linux and FreeBSD unconditionally. * Fixed a stubdom/Makefile build race issue * Dropped -pedantic from headers check, the headers in xen/include/public are not -pedantic clean, and the libraries can include headers from there (and then the check breaks). * Dropped libxencall atform madvise thing, in favour of simpler solution of touching the pages to uncow them. * The xentoollog patch went in but was reverted, that patch now refers to the revisions of qemu and mini-os with the corresponding changes. Even with the dropped acks mini-os and qemu-xen-trad are fully acked, while qemu-xen and xen are mostly acked (but had a few dropped acks since last time). 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/v7.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 v6-with-doc branch of the xen.git linked to above. A few of the initial patches went in, but in the meantime I discovered a wrinkle in the changes to the stubdom build changes, so now there are some new ones. =C2=A0 =C2=A0 tools: Refactor "xentoollog" into its own library went in but then came out again and is now blocking on a libvirt patch, which is in libvirt.git#master waiting to get through our libvirt push gate. Ian.