From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVy0o-00077z-AI for qemu-devel@nongnu.org; Thu, 12 Mar 2015 03:58:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVy0l-0000Et-26 for qemu-devel@nongnu.org; Thu, 12 Mar 2015 03:58:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVy0k-0000Em-Qe for qemu-devel@nongnu.org; Thu, 12 Mar 2015 03:58:30 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2C7wTIx012433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 12 Mar 2015 03:58:29 -0400 Date: Thu, 12 Mar 2015 15:58:26 +0800 From: Fam Zheng Message-ID: <20150312075826.GB12433@ad.nay.redhat.com> References: <1426142455-3739-1-git-send-email-famz@redhat.com> <20150312082047-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150312082047-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Thu, 03/12 08:22, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > > Currently we could leave PCI IRQ asserted even after reset, it is safer > > to clear it. > > > > In the case that a buggy driver has disabled MSI-X unintentially, we may > > have already injected IRQ in previous virtio_pci_notify, which will not > > be cleared by guest because it doesn't expect it (i.e. no irq handler). > > However the driver may eventually notice the unresponsiveness and reset > > the device, at that point, clearing the irq is meaningful. > > > > Signed-off-by: Fam Zheng > > I don't get it. interrupts are de-asserted > in pci core: > > static void pci_do_device_reset(PCIDevice *dev) > { > int r; > > pci_device_deassert_intx(dev); > > ... > } > > why isn't this sufficient? Becuase it's not called by virtio_pci_reset. Fam