Re: [Xen-devel] [PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and provide some stable libraries

2015-06-11 Thread Antti Kantee

On 10/06/15 16:15, Wei Liu wrote:

On Wed, Jun 10, 2015 at 05:01:27PM +0100, Ian Jackson wrote:

Ian Campbell writes ([PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and 
provide some stable libraries):

[stuff]


Most of this looks good to me.


As part of this change I've begun to get rid of the osdep interface
layer, since it is obsolete and just gets in the way. IIRC there were
some tricks being played to use this on rumpkernels to mix and match
facilities from xc_minios.c and xc_netbsd.c.


Replacing those tricks with appropriate #ifdefs would be fine.



FYI I think I will write more glue code to make rump kernel to just use
netbsd code, because they don't want to expose underlying minios
functionalities to application level.


It's not so much that we outright don't want to as prefer not to. 
If there's a strong reason, e.g. a measurably significant performance 
improvement, then we can talk.  However, anything calling past the libc 
interface is dipping into internal interfaces.  We make no guarantee 
about internal interface stability.


One good summary of 8 years of rump kernel development would be lack of 
compartmentalization always comes back to bite you, so IMO it's better 
to conceptually maintain separation even where not enforced by a MMU and 
just make everything go through the guaranteed-stable syscall interfaces.


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


[Xen-devel] [PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and provide some stable libraries

2015-06-10 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.

As a proof of concept these three intertangled series[0] splits out the
xentoollog and event channel device interfaces.

Still to come would be at least the grant table interfaces and a basic
hypercall making facility (including the buffers etc), followed by
libraries for specific out of tree purposes (device model, kexec).

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

I decided to move the event channel functions into a new namespace
(xenevtchn_*) in order to provide a clean break from the old unstable
interfaces to the new stable ones. I've updated all the in tree callers
and qemu-trad and provided a compat shim in libxenctrl for other out of
tree users (which is used for qemu-upstream). My hope is that this can
be removed sooner rather than later. I intend to do the same for the
other interfaces. I haven't done this for the xentoollog stuff since it
already had a separate namespace.

I mulled over putting everything into tools/libs/FOO instead of
tools/libxenFOO, I didn't but I could if people think it is worthwhile.
Eventually I'd like to split libxc into libxenguest and libxenctrl to
cut down on the amount of strange cross talk...

As part of this change I've begun to get rid of the osdep interface
layer, since it is obsolete and just gets in the way. IIRC there were
some tricks being played to use this on rumpkernels to mix and match
facilities from xc_minios.c and xc_netbsd.c. Once the hypercall calling
and grant interfaces are in separate libraries are split this would
become easier since each library can independently choose the desired
backend.

The whole thing has been build tested on Linux and stubdoms, but not
FreeBSD, NetBSD or Solaris. It's certainly not impossible that I've not
got the #includes in the new files quite right.

Ian.

[0] There are 3 series, against xen.git, mini-os.git and
qemu-xen-trad.git. The patches against xen.git point to the patches in
the other two trees with instructions to update the relevant Config.mk
field. The perils of changing unstable interfaces...


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


Re: [Xen-devel] [PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and provide some stable libraries

2015-06-10 Thread Wei Liu
On Wed, Jun 10, 2015 at 05:01:27PM +0100, Ian Jackson wrote:
 Ian Campbell writes ([PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and 
 provide some stable libraries):
  [stuff]
 
 Most of this looks good to me.
 
  As part of this change I've begun to get rid of the osdep interface
  layer, since it is obsolete and just gets in the way. IIRC there were
  some tricks being played to use this on rumpkernels to mix and match
  facilities from xc_minios.c and xc_netbsd.c.
 
 Replacing those tricks with appropriate #ifdefs would be fine.
 

FYI I think I will write more glue code to make rump kernel to just use
netbsd code, because they don't want to expose underlying minios
functionalities to application level.

Wei.

 Ian.

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


Re: [Xen-devel] [PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and provide some stable libraries

2015-06-10 Thread Ian Jackson
Ian Campbell writes ([PATCH RFC 0/6+2+2] Begin to disentangle libxenctrl and 
provide some stable libraries):
 [stuff]

Most of this looks good to me.

 As part of this change I've begun to get rid of the osdep interface
 layer, since it is obsolete and just gets in the way. IIRC there were
 some tricks being played to use this on rumpkernels to mix and match
 facilities from xc_minios.c and xc_netbsd.c.

Replacing those tricks with appropriate #ifdefs would be fine.

Ian.

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