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.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.h')
-rw-r--r-- | tools/libxl/libxl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index c730ac522c..6f659386ee 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -691,7 +691,8 @@ int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, * Insert a CD-ROM device. A device corresponding to disk must already * be attached to the guest. */ -int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk); +int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, + const libxl_asyncop_how *ao_how); /* Network Interfaces */ int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic); |