[Spice-devel] [PATCH 00/12] RFC: add Spice block device
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Jun 20 10:45:59 PDT 2013
Hi,
The following patch series implement a Spice block device, which
allows the client to redirect a block device using the NBD protocol,
which greatly simplifies the Spice code by reusing an existing
protocol, and allows sharing existing qemu NBD implementation.
This block device driver is a bit special, since it is successfully
initialized with size 0, and once the client is connected (or want to
change block device) it re-opens itself. For this to work, we allow a
block driver to be open with an existing opaque data.
The backend only support read-only device atm (although it shouldn't
be hard to add write support if necessary). Migration hasn't been
tested yet.
Usage with a CDROM drive:
-device ide-cd,drive=cd -drive if=none,id=cd,readonly,file=spicebd:
The associated server and client bits are:
http://lists.freedesktop.org/archives/spice-devel/2013-June/013608.html
http://lists.freedesktop.org/archives/spice-devel/2013-June/013609.html
http://lists.freedesktop.org/archives/spice-devel/2013-June/013610.html
Marc-André Lureau (12):
include: add missing config-host.h include
char: add qemu_chr_fe_event()
nbd: don't change socket block during negotiate
Split nbd block client code
nbd: pass export name as init argument
nbd: make session_close() idempotent
block: save the associated child in BlockDriverState
block: extract make_snapshot() from bdrv_open()
block: add "snapshot.size" option to avoid extra bdrv_open()
block: learn to open a driver with a given opaque
block: allow to call bdrv_open() with an opaque
block: add spice block device backend
block.c | 191 ++++++++++-------
block/Makefile.objs | 3 +-
block/nbd-client.c | 391 ++++++++++++++++++++++++++++++++++
block/nbd-client.h | 51 +++++
block/nbd.c | 394 ++++------------------------------
block/spice.c | 523 ++++++++++++++++++++++++++++++++++++++++++++++
include/block/block_int.h | 1 +
include/sysemu/char.h | 10 +
include/ui/qemu-spice.h | 2 +
nbd.c | 1 -
qemu-char.c | 7 +
spice-qemu-char.c | 10 +
12 files changed, 1151 insertions(+), 433 deletions(-)
create mode 100644 block/nbd-client.c
create mode 100644 block/nbd-client.h
create mode 100644 block/spice.c
--
1.8.3.rc1.49.g8d97506
More information about the Spice-devel
mailing list