]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
virtio-serial: convert to virtio_map
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 27 Oct 2015 08:19:43 +0000 (10:19 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 29 Oct 2015 09:05:24 +0000 (11:05 +0200)
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>
hw/char/virtio-serial-bus.c

index be97058712030b041ff44150f7749d1745caab2f..497b0afd9fa4b1aa76591a83eaf768fe9ee5d53c 100644 (file)
@@ -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