summaryrefslogtreecommitdiff
path: root/io/channel.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-01-23 09:17:07 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-02-27 03:46:10 -0500
commit3348e7e34ff945340dbcf310d29d4feb5de20ef6 (patch)
treee53fd2270d1a7c0dc915cb6c0bfd3a1b9053cb87 /io/channel.c
parentd5f99fc578d5f4f2ab731ec692f34ce875d870fe (diff)
downloadqemu-3348e7e34ff945340dbcf310d29d4feb5de20ef6.zip
docs: vhost-user: add in-band kick/call messages
For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have scheduled according to a simulation "calendar". Now, consider the CPU sending I/O to the device, over a vring in the vhost-user protocol. In this case, the CPU must wait for the vring interrupt to have been processed by the device, so that the device is able to put an entry onto the simulation calendar to obtain time to handle the interrupt. Note that this doesn't mean the I/O is actually done at this time, it just means that the handling of it is scheduled before the CPU can continue running. This cannot be done with the asynchronous eventfd based vring kick and call design. Extend the protocol slightly, so that a message can be used for kick and call instead, if VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS is negotiated. This in itself doesn't guarantee synchronisation, but both sides can also negotiate VHOST_USER_PROTOCOL_F_REPLY_ACK and thus get a reply to this message by setting the need_reply flag, and ensure synchronisation this way. To really use it in both directions, VHOST_USER_PROTOCOL_F_SLAVE_REQ is also needed. Since it is used for simulation purposes and too many messages on the socket can lock up the virtual machine, document that this should only be used together with the mentioned features. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Message-Id: <20200123081708.7817-6-johannes@sipsolutions.net> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'io/channel.c')
0 files changed, 0 insertions, 0 deletions