Xenstored is using libxenctrl for only one purpose: to get information
about state of domains.
This RFC patch series is removing that dependency by introducing a new
stable interface which can be used by xenstored instead.
I have chosen to add a new hypercall with sub-commands. This can be
changed, of course, but I thought this would be a good step towards
stable control interfaces for the Xen tools.
I have done only very little testing (basically normal domain creation
and deletion). In case my approach is being accepted I'll do a more
thorough test.
What is missing right now is some cleanup (e.g. the need to allow
the dominfo operation of the domctl hypercall for a stubdom based
Xenstore could be removed). For Mini-OS some more work is needed to
remove the dependency to libxenctrl for xenstore-stubdom, as Mini-OS
can't be configured to use libxenevent and libxengnttab, but not
libxenctrl today. Again, I'll do that cleanup in case the series is
generally accepted.
Juergen Gross (4):
xen: add a domain unique id to each domain
xen: add bitmap to indicate per-domain state changes
xen: add new stable control hypercall
tools/xenstore: use new stable interface instead of libxenctrl
tools/flask/policy/modules/dom0.te | 2 +-
tools/xenstore/Makefile | 3 +-
tools/xenstore/xenstored_control.c | 14 +-
tools/xenstore/xenstored_domain.c | 219 +++++++++++++++-------------
xen/arch/arm/traps.c | 1 +
xen/arch/x86/hvm/hypercall.c | 1 +
xen/arch/x86/hypercall.c | 1 +
xen/arch/x86/pv/hypercall.c | 1 +
xen/common/Makefile | 1 +
xen/common/control.c | 52 +++++++
xen/common/domain.c | 76 ++++++++++
xen/common/event_channel.c | 11 +-
xen/include/Makefile | 1 +
xen/include/public/control.h | 80 ++++++++++
xen/include/public/xen.h | 1 +
xen/include/xen/event.h | 6 +
xen/include/xen/hypercall.h | 5 +
xen/include/xen/sched.h | 7 +
xen/include/xsm/dummy.h | 14 ++
xen/include/xsm/xsm.h | 6 +
xen/xsm/dummy.c | 1 +
xen/xsm/flask/hooks.c | 6 +
xen/xsm/flask/policy/access_vectors | 2 +
23 files changed, 402 insertions(+), 109 deletions(-)
create mode 100644 xen/common/control.c
create mode 100644 xen/include/public/control.h
--
2.26.2