* [Qemu-devel] An ivshmem + chardev peculiarity
@ 2016-02-29 7:26 Markus Armbruster
0 siblings, 0 replies; only message in thread
From: Markus Armbruster @ 2016-02-29 7:26 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Cam Macdonell, Marc-André Lureau,
Claudio Fontana, David Marchand
The ivshmem client/server protocol is one-way: only the server sends.
The only way clients can communicate is by connect and close.
Since the ivshmem device model uses a chardev for its connection to the
server, both connect and close happen in chardev code.
Example: monitor command chardev-add connects, the server starts
sending. chardev-add succeeds. device_add fails somehow. Now you must
chardev-remove to close the connection.
>From the server's point of view, a peer connected and disconnected. It
duly announces this to already connected peers. This is a bit weird,
but it shouldn't cause problems.
If you forget to chardev-remove, the "peer" stays connected. Can be
declared PEBKAC.
Connect on realize and close on realize failure and unrealize would be
neater, I think. Chardevs don't let me do that, as far as I can tell.
Ideas?
There's one exception to the behavior I just described: on version
mismatch, the device model calls qemu_chr_delete(). I consider that a
bug, and I'm going to fix it.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-29 7:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 7:26 [Qemu-devel] An ivshmem + chardev peculiarity Markus Armbruster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).