iov: Introduce a new file for helpers around iovs, add iov_from_buf()
The virtio-net code uses iov_fill() which fills an iov from a linearbuffer. The virtio-serial-bus code does something similar in anopen-coded function.
Create a new iov.c file that has iov_from_buf()....
iov: Add iov_to_buf and iov_size helpers
iov_to_buf() puts the buffer contents in the iov in a linearized buffer.
iov_size() gets the length of the contents in the iov.
The iov_to_buf() function is the memcpy_to_iovec() function that wasused in virtio-ballon.c....
virtio-serial: Handle scatter-gather buffers for control messages
Current control messages are small enough to not be split into multiplebuffers but we could run into such a situation in the future or amalicious guest could cause such a situation.
So handle the entire iov request for control messages....
virtio-serial: Handle scatter/gather input from the guest
Current guests don't send more than one iov but it can change later.Ensure we handle that case.
Signed-off-by: Amit Shah <amit.shah@redhat.com>CC: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Apps should consume all data that guest sends out / Fix virtio api abuse
We cannot indicate to the guest how much data was consumed by an app forout_bufs. So we just have to assume the apps will consume all the datathat are handed over to them....
virtio-serial: Discard data that guest sends us when ports aren't connected
Before the earlier patch, we relied on incorrect virtio api usage tosignal to the guest that a particular buffer wasn't consumed by thehost.
After fixing that, we now just discard the data the guest sends us while...
virtio-serial: Implement flow control for individual ports
Individual ports can now signal to the virtio-serial core to stopsending data if the ports cannot immediately handle new data. When aport later unthrottles, any data queued up in the virtqueue are sent to...
virtio-serial: Update copyright year to 2010
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Propagate errors in initialising ports / devices in guest
If adding of ports or devices in the guest fails we can send out a QMPevent so that management software can deal with it.
virtio-serial: Send out guest data to ports only if port is opened
Data should be written only when ports are open.
View revisions
Also available in: Atom