History | View | Annotate | Download (8.8 kB)
qemu-char: don't issue CHR_EVENT_OPEN in a BH
When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET,and it was issued as a bottom-half:
86e94dea5b740dad65446c857f6959eae43e0ba6
Which we basically used to print out a greeting/prompt for the...
spice-qemu-char: Remove #ifdef-ed code for old spice-server compat
We now require spice-server to be >= 0.12.0 so this is no longer needed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
spice-qemu-char: Add watch support
spice-qemu-char: Remove intermediate buffer
virtio-serial's buffer is valid when it calls us, and we don'taccess it otherwise: vmc_read is only called in response to wakeup,or else we set datalen=0 and throttle. Then vmc_read is called back,we return 0 (not accessing the buffer) and set the timer to unthrottle....
spice-qemu-char: vmc_write: Don't write more bytes then we're asked too
This one took me eons to debug, but I've finally found it now, oh well.
The usage of the MIN macro in this line: last_out = MIN);
Causes qemu_chr_be_can_write to be called twice, since the MIN macro...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
spice-qemu-char: Drop hackish vmc_register on spice_chr_write
Now that the core takes care of fe_open tracking we no longer need this hack.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-12-git-send-email-hdegoede@redhat.com...
qemu-char: Consolidate guest_close/guest_open into a set_fe_open callback
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-7-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Rename opened to be_open
Rename the opened variable to be_open to reflect that it contains theopened state of the backend.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-2-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
spice-qemu-char: Fix name parameter issues after qapi-ifying
The strings passed in through the qapi calls are dynamic memory, sincewe want to have them stick around longer then just the call toqemu_chr_open_spice_* we need to strdup them.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
spice-qemu-char: Remove dead debugging code
Since commit d62e5f7036a018b2ad09f17ebd481bd28953d783"chardev: add spice support to qapi"
It is impossible to set the debug parameter, so all the dprintf callsare essentially nops. Since we've not needed the debug parameter in ages this...
chardev: add spice support to qapi
This patch adds 'spicevmc' and 'spiceport' support to qapi and alsoswitches over the spice chardev initialization to the new qapi codepath.
qemu-char: move spice registration to spice-qemu-char.c
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: 49a8d12eeb117e5530b2fab02af7681b54f9245c.1362505276.git.amit.shah@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'bonzini/header-dirs' into staging
softmmu: move remaining include files to include/ subdirectories
misc: move include files to include/qemu/
janitor: do not rely on indirect inclusions of or from qemu-char.h
Various header files rely on qemu-char.h including qemu-config.h ormain-loop.h, but they really do not need qemu-char.h at all (particularlyinteresting is the case of the block layer!). Clean this up, and also...
spice-qemu-char: write to chardev whatever amount it can read
The current code waits until the chardev can read MINBut some chardev may never reach than amount, in fact some of themwill only ever accept write of 1. Fix the min computation and remove...
spice-qemu-char: factor out CharDriverState creation
Make the CharDriverState creation code reusable by spicevmc port.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
spice-qemu-char: add spiceport chardev
Add a new spice chardev to allow arbitrary communication between thehost and the Spice client via the spice server.
Examples:
This allows the Spice client to have a special port for the qemumonitor:
... -chardev spiceport,name=org.qemu.monitor,id=monitorport...
spice-qemu-char: keep a list of spice chardev
spice-qemu-char: register spicevmc ports during qemu_spice_init()
Do the delayed registration of spicevmc ports after Spice server isinitialized.
spice-qemu-char.c: Show what name is unsupported
Signed-off-by: Eduardo Elias Ferreira <edusf@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Revert "qemu-char: Print strerror message on failure" and deps
The commit's purpose is laudable:
The only way for chardev drivers to communicate an error was to return a NULL pointer, which resulted in an error message that said that something went wrong, but not why....
spice-qemu-char: Generate chardev open/close events
Define a state callback and make that generate chardev open/close events whencalled by the spice-server.
Notes:
1) For all but the newest spice-server versions (which have a fix for this)the code ignores these events for a spicevmc with a subtype of vdagent, this...
spice-qemu-char.c: Use correct printf format char for ssize_t
Use the correct printf format string character (%z) for ssize_t.This fixes a compile failure on 32 bit Linux with spice enabled.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
char: rename qemu_chr_read() -> qemu_chr_be_write()
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
qemu-char: Print strerror message on failure
The only way for chardev drivers to communicate an error was to return a NULLpointer, which resulted in an error message that said that something wentwrong, but not why.
This patch changes the interface to return 0/-errno and updates...
spice-qemu-char: Fix flow control in client -> guest direction
In the old spice-vmc device we used to have:last_out = virtio_serial_write(&svc->port, p, MIN);if (last_out > 0) ...
Now in the chardev backend we have:last_out = MIN;...
spice-chardev: listen to frontend guest open / close
Note the vmc_register_interface() in spice_chr_write is left in placein case someone uses spice-chardev with a frontend which does not haveguest open / close notification.
spice: add chardev (v5)
Adding a chardev backend for spice, where spice determines whatto do with it based on the name attribute given during chardev creation.For usage by spice vdagent in conjunction with a properly namedvirtio-serial device, and future smartcard channel usage....