qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] An ivshmem + chardev peculiarity


From: Markus Armbruster
Subject: [Qemu-devel] An ivshmem + chardev peculiarity
Date: Mon, 29 Feb 2016 08:26:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]