summaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-10-27 10:19:43 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-10-29 11:05:24 +0200
commitbff712dc223f685c684f9caf960e6460e84a96f0 (patch)
tree9cd14b06df6f74bd35dbca7336388dc556edd5df /hw/char
parent3d8db153b4b4e12b6d11590ccd318fff0eafd688 (diff)
virtio-serial: convert to virtio_map
This also fixes a minor bug: - virtqueue_map_sg(port->elem.out_sg, port->elem.out_addr, - port->elem.out_num, 1); is wrong: out_sg is not written so should not be marked dirty. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/virtio-serial-bus.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index be97058712..497b0afd9f 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -705,10 +705,7 @@ static int fetch_active_ports_list(QEMUFile *f, int version_id,
qemu_get_buffer(f, (unsigned char *)&port->elem,
sizeof(port->elem));
- virtqueue_map_sg(port->elem.in_sg, port->elem.in_addr,
- port->elem.in_num, 1);
- virtqueue_map_sg(port->elem.out_sg, port->elem.out_addr,
- port->elem.out_num, 1);
+ virtqueue_map(&port->elem);
/*
* Port was throttled on source machine. Let's