Statistics
| Branch: | Revision:

root / qemu-char.c @ 34b5d2c6

History | View | Annotate | Download (98.9 kB)

# Date Author Comment
f7ad538e 08/26/2013 05:19 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/block' into staging

  1. By Alex Bligh (32) and others
  2. Via Stefan Hajnoczi
    • stefanha/block: (42 commits)
      win32-aio: drop win32_aio_flush_cb()
      aio-win32: replace incorrect AioHandler->opaque usage with ->e
      aio / timers: remove dummy_io_handler_flush from tests/test-aio.c...
bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <>...

4a44d85e 08/20/2013 06:51 pm Seiji Aguchi

Convert stderr message calling error_get_pretty() to error_report()

Convert stderr messages calling error_get_pretty()
to error_report().

Timestamp is prepended by -msg timstamp option with it.

Per Markus's comment below, A conversion from fprintf() to...

3a3567d3 08/13/2013 09:24 pm James Hogan

qemu-char: fix infinite recursion connecting to monitor pty

Since commit bd5c51e (qemu-char: don't issue CHR_EVENT_OPEN in a BH), an
infinite recursion occurs when putting the monitor on a pty (-monitor
pty) and connecting a terminal to the slave port.

This is because of the qemu_chr_be_event(s, CHR_EVENT_OPENED) added to...

7b7ab18d 07/31/2013 02:48 am Michael Roth

chardev: fix CHR_EVENT_OPENED events for mux chardevs

As of bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec, chardevs no longer use
bottom-halves to issue CHR_EVENT_OPENED events. To maintain past
semantics, we instead defer the CHR_EVENT_OPENED events toward the end...

3a1da42e 07/29/2013 06:37 pm Markus Armbruster

qapi: Rename ChardevBackend member "memory" to "ringbuf"

Commit 1da48c6 called the new member "memory" after commit 3949e59
standardized "ringbuf". Rename for consistency.

However, member name "memory" is visible in QMP since 1.5. It's
undocumented just like the driver name. Keep it working anyway....

4f57378f 07/29/2013 06:37 pm Markus Armbruster

Revert "chardev: Make the name of memory device consistent"

This reverts commit 6a85e60cb994bd95d1537aafbff65816f3de4637.

Commit 51767e7 "qemu-char: Add new char backend CirMemCharDriver"
introduced a memory ring buffer character device driver named
"memory". Commit 3949e59 "qemu-char: Saner naming of memchar stuff &...

c11ed966 07/29/2013 06:37 pm Markus Armbruster

qemu-char: Register ring buffer driver with correct name "ringbuf"

The driver is new in 1.4, with the documented name "ringbuf".
However, it's actual name is the completely undocumented "memory".
Screwed up in commit 3949e59. Fix code to match documentation....

ac8c26f6 07/18/2013 07:22 pm Laszlo Ersek

char: io_channel_send: don't lose written bytes

The g_io_channel_write_chars() documentation states,

bytes_written: The number of bytes written. This can be nonzero even if
the return value is not G_IO_STATUS_NORMAL. [...]

io_channel_send() could lose such bytes before....

0f953051 07/10/2013 08:39 pm Markus Armbruster

qemu-char: Fix ringbuf option size

Any attempt to use it trips an "opt->desc->type == QEMU_OPT_NUMBER"
assertion. Broken in commit 1da48c65.

Cc:
Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>...

02c4bdf1 07/09/2013 09:14 pm Paolo Bonzini

trap signals for "-serial mon:stdio"

With mon:stdio you can exit the VM by switching to the monitor and
sending the "quit" command. It is then useful to pass Ctrl-C to the
VM instead of exiting.

This in turn lets us stop tying the default signal handling behavior...

ffeec223 06/28/2013 11:48 pm Anthony Liguori

Merge remote-tracking branch 'mjt/trivial-patches' into staging

  1. By Gerd Hoffmann (13) and Michael Tokarev (1)
  2. Via Michael Tokarev
    • mjt/trivial-patches:
      doc: we use seabios, not bochs bios
      qemu-socket: don't leak opts on error
      qemu-char: report udp backend errors...
2ea3e2c1 06/28/2013 10:04 pm Markus Armbruster

qemu-char: Fix ID reuse after chardev-remove for qapi-based init

Commit 2c5f488 introduced qapi-based character device initialization
as a new code path in qemu_chr_new_from_opts(). Unfortunately, it
failed to store parameter opts in the new chardev. Therefore,...

bb6fb7c0 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: add -chardev mux support

Allow to explicitly create mux chardevs on the command line,
like you can using QMP.

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

58a3714c 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: report udp backend errors

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

e859eda5 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: check optional fields using has_*

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

20c39760 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: use more specific error_setg_* variants

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

fdca2124 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: print notification to stderr

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

e668287d 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: don't leak opts on error

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

99aec012 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: use ChardevBackendKind in CharDriver

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

dc2c4eca 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: minor mux chardev fixes

mux failure path has a memory leak. creating a mux chardev can't
fail though, so just assert() that instead of fixing an error path
which never ever runs anyway ...

Also fix bid being leaked while being at it.

Signed-off-by: Gerd Hoffmann <>...

e990a393 06/21/2013 09:52 pm liguang

qemu-char: use bool in qemu_chr_open_socket and simplify code a bit

Local variables is_* should be bool by usage.
While at it, simplify the logic/code a bit.

Signed-off-by: liguang <>
Signed-off-by: Michael Tokarev <>

4efeabbb 06/14/2013 01:28 pm Michael Tokarev

create qemu_openpty_raw() helper function and move it to a separate file

In two places qemu uses openpty() which is very system-dependent,
and in both places the pty is switched to raw mode as well.
Make a wrapper function which does both steps, and move all the...

c58e6201 06/11/2013 10:45 pm Michael Tokarev

qemu-char: remove a few needless #includes

This removes <syslog.h> since we don't use
syslogging, and removes second, solaris-specific,
include of <net/if.h> (which is included in
a common part of the file)

Signed-off-by: Michael Tokarev <>

bd5c51ee 06/10/2013 07:38 pm Michael Roth

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...

60d95386 05/27/2013 01:47 pm Gerd Hoffmann

chardev: fix "info chardev" output

Fill unset CharDriverState->filename with the backend name, so
'info chardev' will return at least the chardev type. Don't
touch it in case the chardev init function filled it already,
like the socket+pty chardevs do for example....

3022e6b4 05/27/2013 01:47 pm Gerd Hoffmann

Revert "chardev: Get filename for new qapi backend"

Does not handle chardevs created via chardev-add monitor command.

This reverts commit 2b220025993e76d4116781ca91a4fabc5ad9c722.

Signed-off-by: Gerd Hoffmann <>

6a85e60c 05/22/2013 03:40 pm Lei Li

chardev: Make the name of memory device consistent

Now we have memory char device, but the backend name of it
is a little confusion. We actually register it by 'memory', but
the description in qemu-option, the name of open functions
and the new api backend called it 'ringbuf'. It should keep...

2b220025 05/22/2013 03:40 pm Lei Li

chardev: Get filename for new qapi backend

This patch sets the filename when the new qapi backend
init from opts.

The previous patch and discussions as link below:

http://patchwork.ozlabs.org/patch/243896/

If anyone who have better idea to fix this please let...

3d1bba20 05/22/2013 03:40 pm Peter Crosthwaite

glib: Fix some misuses of gsize/size_t types

This unbreaks cross compile builds:

configure --target-list="i386-softmmu" --cpu=i386

When building on a 64bit machine.

Reported-by: David Holsgrove <>
Signed-off-by: Peter Crosthwaite <>...

08d0ab3f 05/20/2013 04:20 pm Lei Li

chardev: Make consistent with udp device for new qapi backend

When register and open a chardev udp, the backend name should be udp
not dgram, and we do not have backend dgram in the chardev list. This
patch makes the new qapi udp backend consistent with the original...

7791dba3 05/14/2013 04:53 pm Paolo Bonzini

portability: pty.h is glibc-specific

This should fix building the GTK+ front-end on BSDs.

Signed-off-by: Paolo Bonzini <>
Message-id:
Signed-off-by: Anthony Liguori <>

79f20075 04/25/2013 10:45 pm Hans de Goede

qemu-char: Set foo_tag = 0 when returning FALSE from callbacks

While reviewing some patches I found this problem where tcp_chr_accept
does not clear listen_tag when returning FALSE, leading to a double
g_source_remove of the underlying source. Not really a problem unless the id...

2b316774 04/22/2013 04:52 pm Paolo Bonzini

qemu-char: do not operate on sources from finalize callbacks

Due to a glib bug, the finalize callback is called with the GMainContext
lock held. Thus, any operation on the context from the callback will
cause recursive locking and a deadlock. This happens, for example,...

910b6368 04/22/2013 04:52 pm Paolo Bonzini

qemu-char: use consistent idiom for removing sources

Always check that the source is active, and zero the tag afterwards.

The occurrence in pty_chr_state will trigger with the next patch, the
others are just theoretical.

Signed-off-by: Paolo Bonzini <>...

85a67692 04/22/2013 04:52 pm Paolo Bonzini

qemu-char: simplify pty polling

There is no need to use a timer and pty_chr_read to detect a connected
pty. It is simpler to just call g_poll periodically and check for POLLHUP.
It is done once per second, and only if the pty is disconnected, so it
is cheap enough....

cdbf6e16 04/22/2013 04:52 pm Paolo Bonzini

qemu-char: correct return value from chr_read functions

Even if a CharDriverState's source is blocked by the front-end,
it must not be dropped. The IOWatchPoll that wraps it will take
care of adding and removing it to the main loop. Only remove
the source when the channel is closed; and in that case, make sure...

4ceb193d 04/16/2013 01:06 am Anthony Liguori

Merge remote-tracking branch 'bonzini/hw-dirs' into staging

  • bonzini/hw-dirs:
    exec: remove useless declarations from memory-internal.h
    memory: move core typedefs to qemu/typedefs.h
    include: avoid useless includes of exec/ headers
    sysemu: avoid proliferation of include/ subdirectories...
dccfcd0e 04/15/2013 07:19 pm Paolo Bonzini

sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <>

0ca5aa4f 04/15/2013 06:22 pm Paolo Bonzini

qemu-char: another io_add_watch_poll fix

After attaching the source, we have to remove the reference we hold
to it, because we do not hold anymore a pointer to the source.

If we do not do this, removing the source will not finalize it and
will not drop the "real" I/O watch source....

1e885b25 04/08/2013 06:38 pm Paolo Bonzini

qemu-char: really fix behavior on can_read = 0

I misread the glib manual, g_source_remove does not let you re-attach
the source later. This behavior (called "blocking" the source in glib)
is present in glib's source code, but private and not available outside...

d185c094 04/05/2013 08:53 pm Paolo Bonzini

qemu-char: eliminate busy waiting on can_read returning zero

The character backend refactoring introduced an undesirable busy wait.
The busy wait happens if can_read returns zero and there is data available
on the character device's file descriptor. Then, the I/O watch will...

4bf0bb80 04/05/2013 03:42 pm Luiz Capitulino

chardev: drop the Memory chardev driver

It's not used anymore since the last commit.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Acked-by: Gerd Hoffmann <>

44c473de 04/05/2013 03:21 am Hans de Goede

qemu-char: Add qemu_chr_fe_claim / _release helper functions

Add qemu_chr_fe_claim / _release helper functions for properly dealing with
avail_connections.

Signed-off-by: Hans de Goede <>
Message-id: ...

456d6069 04/05/2013 03:21 am Hans de Goede

qemu-char: Call fe_claim / fe_release when not using qdev chr properties

chardev-frontends need to explictly check, increase and decrement the
avail_connections "property" of the chardev when they are not using a
qdev-chardev-property for the chardev.

This fixes things like:...

162cbbd1 04/02/2013 10:07 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Stefan Hajnoczi
  2. Via Luiz Capitulino
    • luiz/queue/qmp:
      chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors
      qemu-socket: set passed fd non-blocking in socket_connect()
      net: ensure "socket" backend uses non-blocking fds...
f9e8cacc 04/02/2013 06:47 pm Stefan Hajnoczi

oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()

The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.
Rename to qemu_set_nonblock() just like qemu_set_cloexec().

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Eric Blake <>...

9b938c72 04/02/2013 06:47 pm Stefan Hajnoczi

chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors

When we receive a file descriptor over a UNIX domain socket the
O_NONBLOCK flag is preserved. Clear the O_NONBLOCK flag and rely on
QEMU file descriptor users like migration, SPICE, VNC, block layer, and...

684a096e 04/02/2013 04:13 pm Anthony Liguori

qemu-char: rewrite io_channel_send_all and drop the '_all' suffix

The current code is oddly written and have equally odd semantics.
Despite the '_all' suffix, upon EAGAIN the result will be a partial
write but instead of returning the partial write, we return EAGAIN....

fee204fd 03/27/2013 05:26 pm Hans de Goede

qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_open

To better reflect that it is for handling a backend being opened.

Signed-off-by: Hans de Goede <>
Message-id:
Signed-off-by: Anthony Liguori <>

c0c4bd2c 03/27/2013 05:26 pm Hans de Goede

qemu-char: Add fe_open tracking

Add tracking of the fe_open state to struct CharDriverState.

Signed-off-by: Hans de Goede <>
Message-id:
Signed-off-by: Anthony Liguori <>

19083228 03/27/2013 05:26 pm Hans de Goede

qemu-char: Automatically do fe_open / fe_close on qemu_chr_add_handlers

Most frontends can't really determine if the guest actually has the frontend
side open. So lets automatically generate fe_open / fe_close as soon as a
frontend becomes ready (as signalled by calling qemu_chr_add_handlers) /...

8e25daa8 03/27/2013 05:26 pm Hans de Goede

qemu-char: Cleanup: consolidate fe_open/fe_close into fe_set_open

Signed-off-by: Hans de Goede <>
Message-id:
Signed-off-by: Anthony Liguori <>

574b711a 03/27/2013 05:26 pm Hans de Goede

qemu-char: Consolidate guest_close/guest_open into a set_fe_open callback

Signed-off-by: Hans de Goede <>
Message-id:
Signed-off-by: Anthony Liguori <>

85d91e32 03/27/2013 05:26 pm Hans de Goede

qemu-char: Move incrementing of avail_connections to qdev-properties-system

The decrement of avail_connections is done in qdev-properties-system move
the increment there too for proper balancing of the calls.

Signed-off-by: Hans de Goede <>...

a59bcd31 03/27/2013 05:26 pm Hans de Goede

qemu-char: add_handlers: Don't re-send the be_open event on unregister

Resending the be_open event only is useful when a frontend is registering, not
when it is unregistering.

Signed-off-by: Hans de Goede <>
Message-id: ...

16665b94 03/27/2013 05:26 pm Hans de Goede

qemu-char: Rename opened to be_open

Rename the opened variable to be_open to reflect that it contains the
opened state of the backend.

Signed-off-by: Hans de Goede <>
Message-id:
Signed-off-by: Anthony Liguori <>

cd18720a 03/26/2013 05:08 pm Anthony Liguori

char: introduce a blocking version of qemu_chr_fe_write

Signed-off-by: Anthony Liguori <>

2c8a5942 03/19/2013 02:56 pm Kevin Wolf

char: Fix return type of qemu_chr_fe_add_watch()

qemu_chr_fe_add_watch() can return negative errors, therefore it must
not have an unsigned return type. For consistency with other
qemu_chr_fe_* functions, this uses a standard C int instead of glib
types....

e5545854 03/13/2013 11:27 am Igor Mitsyanko

qemu-char.c: fix waiting for telnet connection message

Current colon position in "waiting for telnet connection" message template
produces messages like:
QEMU waiting for connection on: telnet::127.0.0.16666,server

After moving a colon to the right, we will get a correct messages like:...

f5a51cab 03/13/2013 11:27 am Gerd Hoffmann

chardev: add msmouse support to qapi

This patch adds 'msmouse' support to qapi and also switches over
the msmouse chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

2d57286d 03/13/2013 11:27 am Gerd Hoffmann

chardev: add braille support to qapi

This patch adds 'braille' support to qapi and also switches over
the braille chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

846e2e49 03/13/2013 11:27 am Gerd Hoffmann

chardev: switch file init to qapi

This patch switches over the 'file' chardev initialization
to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

7c358031 03/13/2013 11:27 am Gerd Hoffmann

chardev: add stdio support to qapi

This patch adds 'stdio' support to qapi and also switches over the
stdio chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

0f1cb51d 03/13/2013 11:27 am Gerd Hoffmann

chardev: switch serial/tty init to qapi

This patch switches over the serial chardev initialization
to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

dc375097 03/13/2013 11:27 am Gerd Hoffmann

chardev: switch parallel init to qapi

This patch switches over the parallel chardev initialization
to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

e68c5958 03/13/2013 11:27 am Gerd Hoffmann

chardev: switch pty init to qapi

This patch switches over the pty chardev initialization
to the new qapi code path.

Bonus: Taking QemuOpts out of the loop allows some nice
cleanups along the way.

Signed-off-by: Gerd Hoffmann <>

d9ac374f 03/13/2013 11:27 am Gerd Hoffmann

chardev: add console support to qapi

This patch adds 'console' support to qapi and also switches over the
console chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

548cbb36 03/13/2013 11:27 am Gerd Hoffmann

chardev: add pipe support to qapi

This patch adds 'pipe' support to qapi and also switches over the
pipe chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

cd153e2a 03/13/2013 11:27 am Gerd Hoffmann

chardev: add spice support to qapi

This patch adds 'spicevmc' and 'spiceport' support to qapi and also
switches over the spice chardev initialization to the new qapi code
path.

702ec69c 03/13/2013 11:27 am Gerd Hoffmann

chardev: add vc support to qapi

This patch adds 'vc' support to qapi and also switches over the
vc chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

1da48c65 03/13/2013 11:27 am Gerd Hoffmann

chardev: add memory (ringbuf) support to qapi

This patch adds 'memory' support to qapi and also switches over
the memory chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

3ecc059d 03/13/2013 11:27 am Gerd Hoffmann

chardev: add udp support to qapi

This patch adds 'udp' support to qapi.

Signed-off-by: Gerd Hoffmann <>

2c5f4882 03/13/2013 11:27 am Gerd Hoffmann

chardev: add support for qapi-based chardev initialization

This patch add support for a new way to initialize chardev devices.
Instead of calling a initialization function with a QemuOpts we will
now create a (qapi) ChardevBackend, optionally call a function to...

edb2fb3c 03/13/2013 11:27 am Gerd Hoffmann

chardev: add mux chardev support to qapi

This adds mux chardev support to the qapi and also makes the qapi-based
chardev creation path handle the "mux=on" option correctly.

80dca9e6 03/13/2013 11:27 am Gerd Hoffmann

chardev: switch null init to qapi

This patch switches over the 'null' chardev initialization
to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

4549a8b7 03/12/2013 08:40 pm Stefan Berger

Add a TPM Passthrough backend driver implementation

This patch is based of off version 9 of Stefan Berger's patch series
"QEMU Trusted Platform Module (TPM) integration"
and adds a new backend driver for it.

This patch adds a passthrough backend driver for passing commands sent to the...

44ab9ed4 03/11/2013 02:26 am Blue Swirl

qemu-char: fix win32 build

96c6384776d631839a9c8fe02bf135f9ba22586c did not adjust
Win32 #ifdeffery properly, breaking build in later commits. Fix.

Signed-off-by: Blue Swirl <>
Tested-by: Igor Mitsyanko <>
Message-id: ...

08744c98 03/08/2013 09:57 pm Anthony Liguori

qemu-char: move baum registration to baum.c

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

5ab8211b 03/08/2013 09:57 pm Anthony Liguori

qemu-char: move msmouse registeration to msmouse.c

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

01f45d98 03/08/2013 09:57 pm Anthony Liguori

qemu-char: move text console init to console.c

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

23673ca7 03/08/2013 09:57 pm Anthony Liguori

qemu-char: add watch support

This allows a front-end to request for a callback when the backend
is writable again.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id: ...

e6a87ed8 03/08/2013 09:57 pm Anthony Liguori

qemu-char: add pty watch

This lets ptys support adding front end watchs.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id: ...

d3cc5bc4 03/08/2013 09:57 pm Amit Shah

char: add gio watch fn for tcp backends

Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

8aa33caf 03/08/2013 09:57 pm Anthony Liguori

qemu-char: use a glib timeout instead of qemu-timer

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

9f939df9 03/08/2013 09:57 pm Anthony Liguori

qemu-char: remove use of QEMUTimer in favor of glib idle function

qemu-char is now independent of the QEMU main loop.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id: ...

d654f34e 03/08/2013 09:57 pm Anthony Liguori

qemu-char: make char drivers dynamically registerable

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

26c60614 03/08/2013 09:57 pm Anthony Liguori

qemu-char: move spice registration to spice-qemu-char.c

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

2ea5a7af 03/08/2013 09:57 pm Anthony Liguori

qemu-char: tcp: make use GIOChannel

I didn't bother switching to g_io_channel_read/write because we need to use
sendmsg on Unix. No problem though since we're using an unbuffered channel.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>...

a29753f8 03/08/2013 09:57 pm Anthony Liguori

qemu-char: convert fd_chr to use a GIOChannel

This uses the newly introduced IOWatchPoll source.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id: ...

093d3a20 03/08/2013 09:57 pm Anthony Liguori

qemu-char: convert pty to GIOChannel

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

76a9644b 03/08/2013 09:57 pm Anthony Liguori

qemu-char: convert UDP to GIOChannel

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

ed7a1540 03/08/2013 09:57 pm Anthony Liguori

qemu-char: remove dead/confusing logic with nb_stdio_clients

This code is very old dating back to 2007. What is puzzling is that
STDIO_MAX_CLIENTS was always #define to 1 meaning that all of the code to deal
with more than one client was unreachable.

Just remove the whole mess of it....

96c63847 03/08/2013 09:57 pm Anthony Liguori

char: add IOWatchPoll support

This is a special GSource that supports CharDriverState style
poll callbacks.

For reviewability and bisectability, this code is #if 0'd out in this
patch to avoid unused warnings since all of the functions are static.

Signed-off-by: Anthony Liguori <>...

bf1c852a 03/04/2013 10:54 am MORITA Kazutaka

move socket_set_nodelay to osdep.c

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

d82831db 02/22/2013 12:34 am Anthony Liguori

console: allow VCs to be overridden by UI

We want to expose VCs using a VteTerminal widget. We need access to provide our
own CharDriverState in order to do this.

Signed-off-by: Anthony Liguori <>
Message-id:

d36b2b90 02/13/2013 07:57 pm Markus Armbruster

qapi: Flatten away ChardevPort

Simplifies the schema and the code.

QMP command

{ "execute" : "chardev-add",
"arguments" : { "id" : "ser0",
"backend" : { "type" : "port",
"data" : { "type": "serial",...
312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
3949e594 02/07/2013 12:35 am Markus Armbruster

qemu-char: Saner naming of memchar stuff & doc fixes

New device, has never been released, so we can still improve things
without worrying about compatibility.

Naming is a mess. The code calls the device driver CirMemCharDriver,
the public API calls it "memory", "memchardev", or "memchar", and the...

de1cc36e 02/07/2013 12:35 am Markus Armbruster

qemu-char: Support suffixed ringbuf size arguments like "size=64K"

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Anthony Liguori <>