Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbdDEGgO (ORCPT ); Wed, 5 Apr 2017 02:36:14 -0400 Received: from verein.lst.de ([213.95.11.211]:55449 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbdDEGgM (ORCPT ); Wed, 5 Apr 2017 02:36:12 -0400 Date: Wed, 5 Apr 2017 08:36:06 +0200 From: Christoph Hellwig To: "Michael S. Tsirkin" Cc: Christoph Hellwig , Mike Galbraith , Thorsten Leemhuis , virtio-dev@lists.oasis-open.org, Linux Kernel Mailing List , rjones@redhat.com Subject: Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues") Message-ID: <20170405063606.GA26636@lst.de> References: <1490768602.5950.25.camel@gmx.de> <20170329230936-mutt-send-email-mst@kernel.org> <1490843414.4167.11.camel@gmx.de> <1490858435.4696.25.camel@gmx.de> <20170331041959-mutt-send-email-mst@kernel.org> <20170331032231.GA2471@redhat.com> <20170331082049.GA4485@lst.de> <20170331194416-mutt-send-email-mst@kernel.org> <20170403141823.GA24747@lst.de> <20170403185501-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403185501-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1342 Lines: 31 On Mon, Apr 03, 2017 at 07:14:22PM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 03, 2017 at 04:18:23PM +0200, Christoph Hellwig wrote: > > Mike, > > > > can you try the patch below? > > > > --- > > >From fe41a30b54878cc631623b7511267125e0da4b15 Mon Sep 17 00:00:00 2001 > > From: Christoph Hellwig > > Date: Mon, 3 Apr 2017 14:51:35 +0200 > > Subject: virtio_pci: don't use shared irq for virtqueues > > > > Reimplement the shared irq feature manually, as we might have a larger > > number of virtqueues than the core shared interrupt code can handle > > in threaded interrupt mode. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/virtio/virtio_pci_common.c | 142 +++++++++++++++++++++---------------- > > drivers/virtio/virtio_pci_common.h | 1 + > > 2 files changed, 83 insertions(+), 60 deletions(-) > > Well the original patch this is trying to fix is > 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507 which dropped just 40 lines > with documentation. It did this by re-using error handling to switch > from per-vq to non-per-vq mode. Now this has separate flows for errors > and per-vq non-per-vq switch and (I think, as a result) is adding 140 > lines which doesn't make me very happy. The above adds 23 lines. We could entangle both loops again, but I'm not sure it's going to buy us much.