Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtI2L-0007Mm-Rg for qemu-devel@nongnu.org; Tue, 25 Nov 2014 10:28:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtI2F-00076f-PB for qemu-devel@nongnu.org; Tue, 25 Nov 2014 10:28:17 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:61178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtI2F-00076T-Ix for qemu-devel@nongnu.org; Tue, 25 Nov 2014 10:28:11 -0500 Received: by mail-wg0-f53.google.com with SMTP id l18so1143048wgh.26 for ; Tue, 25 Nov 2014 07:28:10 -0800 (PST) Message-ID: <5474A020.40103@m2r.biz> Date: Tue, 25 Nov 2014 16:28:32 +0100 From: Fabio Fantoni MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Xen-devel] [PATCH 0/4] virtio-net: do not leak cpu mappings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, wei Liu , mst@redhat.com, jasowang@redhat.com, pbonzini@redhat.com Il 25/11/2014 15:42, Stefano Stabellini ha scritto: > Hi all, > this patch series fixes a cpu mapping leak in virtio-net. > > The bug is caused by virtio_net_handle_ctrl: it maps the entire out_sg > iov, but then modifies it and reduces it (iov_discard_front), and only > unmap the reduced version of the iov. > > This causes a crash when running on Xen, but the behaviour is obviously > incorrect without Xen too. > > The patch series fixes the issue by allowing virtio_net_handle_ctrl to > unmap the original out_sg iov but still call virtqueue_fill and > virtqueue_flush on the modified iov. > > The first three patches do not introduce any functional changes. Thanks for these pathes, 1-2 years ago I tried to use virtio net and disks on xen unsuccessful and I was unable to solve it. When I'll have time I'll retry. About virtio disks can have problem similar to this or should be ok? About the other patches posted in link below are all not applied and should be only rebased or they must be fully revisioned/modified? http://wiki.xen.org/wiki/Virtio_On_Xen Thanks for any reply and sorry for my bad english. > > > Stefano Stabellini (4): > introduce virtqueue_unmap_sg > use virtqueue_unmap_sg in virtqueue_fill > move virtqueue_unmap_sg calls from virtqueue_fill to virtqueue_push > virtio-net: do not leak cpu mappings > > hw/net/virtio-net.c | 9 ++++++++- > hw/virtio/virtio.c | 43 ++++++++++++++++++++++++------------------- > include/hw/virtio/virtio.h | 2 ++ > 3 files changed, 34 insertions(+), 20 deletions(-) > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel