From: Wei Liu Subject: Re: [Xen-devel] [PATCH 0/4] virtio-net: do not leak cpu mappings Date: Tue, 25 Nov 2014 17:09:17 +0000 Message-ID: <20141125170917.GC2893@zion.uk.xensource.com> References: <5474A020.40103@m2r.biz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <5474A020.40103@m2r.biz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Fabio Fantoni Cc: xen-devel@lists.xensource.com, wei Liu , mst@redhat.com, jasowang@redhat.com, Stefano Stabellini , qemu-devel@nongnu.org, pbonzini@redhat.com List-Id: xen-devel@lists.xenproject.org On Tue, Nov 25, 2014 at 04:28:32PM +0100, Fabio Fantoni wrote: > 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 > Don't use patches on that page. They are outdated. I think Stefano's patch series intends to fix issue for HVM guest, which might well be what you're using. Well, I would be very surprised if you tell me you're using PV virtio! ;-) Wei.