From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrjgW-0006m2-JK for qemu-devel@nongnu.org; Thu, 29 Oct 2015 05:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrjgR-0000ch-It for qemu-devel@nongnu.org; Thu, 29 Oct 2015 05:39:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrjgR-0000cH-Dk for qemu-devel@nongnu.org; Thu, 29 Oct 2015 05:39:47 -0400 Date: Thu, 29 Oct 2015 11:39:44 +0200 From: "Michael S. Tsirkin" Message-ID: <1446111531-5755-10-git-send-email-mst@redhat.com> References: <1446111531-5755-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446111531-5755-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 09/16] virtio-serial: convert to virtio_map List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , Peter Maydell , Paolo Bonzini , Igor Mammedov 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 Reviewed-by: Igor Mammedov --- hw/char/virtio-serial-bus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index be97058..497b0af 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 -- MST