All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: RFC/Proposal: Partial `libxenctrl` API/ABI stabilisation
Date: Mon, 18 May 2015 16:55:00 +0100	[thread overview]
Message-ID: <555A0B54.5090808@citrix.com> (raw)
In-Reply-To: <1431963008.4944.80.camel@citrix.com>

On 18/05/15 16:30, Ian Campbell wrote:
> # Major External Consumers of `libxenctrl`
>
> * qemu
> * kexec tools
> * in guest tools e.g. users of `libxenstore`, `libvchan`, and by
>   extension `grant table` and `event channel` functionality. NB:
>   `libxenstore` is already `SSU` or `SSS` (XXX?)
>
> # `libxenctrl` symbols
>
> Gathered by:
>
>     nm tools/libxc/libxenctrl.so | grep ' [Tt] ' | cut -f 3 -d \ | sort -u
>
> `libxenctrl` today exposes many symbols which look to be internal. We
> should consider also reducing that set by using
> `__attribute__((visibility("hidden")))`.

Don't forget libxenguest.so which is built sharing some of the same
source.  I suspect that quite a few of the libxenctrl symbols could move to

>
> The following proposes some functional groupings via some proposed
> split library names. In some cases we may also wish to consider
> replacing an API with one which can be properly maintained going
> forwards. e.g.:
>
> - perhaps replacing domctl's used by qemu with new stable
>   hypercall ABIs and reflecting that in new library APIs.
> - perhaps exposing more constrained versions of some broad interfaces
>   for external users.
>
> XXX: Change `xc_*` namespacing as well as library names?
>
> ## `libxenhypercall`
>
> Core open/close interface, "make a hypercall" functionality, hypercall
> buffers.
>
> All other libraries likely depend on this. Applications do as well in
> order to access open/close interface at least.
>
>     - xc_interface_close
>     - xc_interface_is_fake (???)

This is used when running something wanting libxc on a non xen system. 
e.g. readnotes which invokes the Xen elf parsing on a binary, but
doesn't have any actual hypervisor interaction.

>     - xc_interface_open
>     - xc_hypercall_buffer_array_create
>     - xc_hypercall_buffer_array_destroy

There are surely more than this when it comes to hypercall buffers?

One issue I have found with libxc in general is that a surprising
quantity of code is in static inlines in header files, which ends up
moving into the includee's code. (I had a particular problem with
do_domctl() and the Xen Interface Version for a project I did a while back)

At some point with some copious free time, I want to see about doing an
ioctl to get lowmem pages out of the kernel, which would be large
benifit for longer-running operations using hypercalls.  The logdirty
bitmap for example is large, used frequently during migrate, and are
currently allocated, double bounced, and deallocated on every individual
call.


>
> ## `libxenevtchn`
>
> Interacting with `/dev/xen/evtchn`
>
>     - xc_evtchn_alloc_unbound
>     - xc_evtchn_bind_interdomain
>     - xc_evtchn_bind_unbound_port
>     - xc_evtchn_bind_virq
>     - xc_evtchn_close
>     - xc_evtchn_fd
>     - xc_evtchn_notify
>     - xc_evtchn_open
>     - xc_evtchn_pending
>     - xc_evtchn_reset
>     - xc_evtchn_status
>     - xc_evtchn_unbind
>     - xc_evtchn_unmask
>
> ## `libxengnttab`
>
> Interacting with `/dev/xen/gnt{shr,alloc}`
>
> XXX two libs or one?
>
>     - xc_gntshr_close
>     - xc_gntshr_munmap
>     - xc_gntshr_open
>     - xc_gntshr_share_page_notify
>     - xc_gntshr_share_pages
>     - xc_gnttab_close
>     - xc_gnttab_get_version
>     - xc_gnttab_map_domain_grant_refs
>     - xc_gnttab_map_grant_ref
>     - xc_gnttab_map_grant_ref_notify
>     - xc_gnttab_map_grant_refs
>     - xc_gnttab_map_table_v1
>     - xc_gnttab_map_table_v2
>     - xc_gnttab_munmap
>     - xc_gnttab_op
>     - xc_gnttab_open
>     - xc_gnttab_set_max_grants

One probably, given how small it would be.

~Andrew

  reply	other threads:[~2015-05-18 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 15:30 RFC/Proposal: Partial `libxenctrl` API/ABI stabilisation Ian Campbell
2015-05-18 15:55 ` Andrew Cooper [this message]
2015-05-19  8:52   ` Ian Campbell
2015-05-18 16:06 ` Jan Beulich
2015-05-19  8:40   ` Ian Campbell
2015-05-19  8:48     ` Jan Beulich
2015-05-19  9:48       ` Ian Campbell
2015-05-19  8:53 ` Ian Campbell
2015-05-20 17:37   ` Stefano Stabellini
2015-05-21  9:01     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555A0B54.5090808@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.