Commit bff712dc authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

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: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
parent 3d8db153
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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