diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-07-26 15:58:18 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-07-26 15:58:18 +0100 |
commit | e158dcadaf6e6842791fe5114cc0e1de0e77ffbd (patch) | |
tree | 80d924a74c2212d9466620cc1178f23fd859b3aa /tools/libxl/libxl_internal.h | |
parent | f5e3add94b9455922f3374e61acd60ffddb6b5de (diff) | |
download | xen-e158dcadaf6e6842791fe5114cc0e1de0e77ffbd.tar.gz xen-e158dcadaf6e6842791fe5114cc0e1de0e77ffbd.tar.bz2 xen-e158dcadaf6e6842791fe5114cc0e1de0e77ffbd.zip |
libxl: make libxl_cdrom_insert async.
This functionality is a bit of a mess and several configurations are
not properly supported.
The protocol for changing is basically to change the params node in
the disk xenstore backend. There is no interlock or error reporting in
this protocol. Completely removing the device and recreating it is not
necessary nor expected. For reference the equivalent xend code is
tools/python/xen/xend/server/blkif.py::BlkifController::reconfigureDevice().
Device model stub domains are not supported. There appears to be no
way correctly to do a media change on the emulated device while also
changing the stub domains PV backend to point to the new
backend. Reworking this is a significant task deferred until 4.3. xend
(via the equivalent "xm block-configure" functionality) also does not
support media change for stub domains (confirmed by code inspection
and experiment). Unlike xend this version errors out instead of
silently not achieving anything in this case.
There is no support for qemu-xen (upstream) media change. I expect
this is supported on the qemu side and required QMP plumbing on the
libxl side. Again this is deferred until 4.3.
On the plus side the current implementation is trivially "asynchronous".
Adds a libxl__xs_writev_atonce helper to write a key-value list to
xenstore in one go.
Tested with Windows 7.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.h')
-rw-r--r-- | tools/libxl/libxl_internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 4938510ec0..fc71eb4ec8 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -498,8 +498,13 @@ _hidden int libxl__remove_file_or_directory(libxl__gc *gc, const char *path); _hidden char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length); +/* treats kvs as pairs of keys and values and writes each to dir. */ _hidden int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t, const char *dir, char **kvs); +/* _atonce creates a transaction and writes all keys at once */ +_hidden int libxl__xs_writev_atonce(libxl__gc *gc, + const char *dir, char **kvs); + _hidden int libxl__xs_write(libxl__gc *gc, xs_transaction_t t, const char *path, const char *fmt, ...) PRINTF_ATTRIBUTE(4, 5); /* Each fn returns 0 on success. |