From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXRgn-0003BY-UL for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXRge-0005MV-MN for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:19:45 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:56476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXRgd-0005M2-IT for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:19:36 -0400 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Sep 2014 14:49:24 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 266C0E0057 for ; Fri, 26 Sep 2014 14:52:02 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8Q9LdMH5177720 for ; Fri, 26 Sep 2014 14:51:40 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8Q9JKmU013839 for ; Fri, 26 Sep 2014 14:49:20 +0530 From: Nikunj A Dadhania In-Reply-To: <20140924192038.2216c11c@bahia.local> References: <1411066387-30889-1-git-send-email-mst@redhat.com> <1411066387-30889-15-git-send-email-mst@redhat.com> <20140922192857.18930639@bahia.local> <20140923042632.GA15022@redhat.com> <20140924192038.2216c11c@bahia.local> Date: Fri, 26 Sep 2014 14:49:15 +0530 Message-ID: <87vboabuy4.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Greg Kurz , "Michael S. Tsirkin" Cc: Peter Maydell , Jason Wang , qemu-devel@nongnu.org, Anthony Liguori Hi Alex/Peter, The below patch is already been picked in master and ppc-next and has broken pseries booting from virtio-blk device Greg Kurz writes: > On Tue, 23 Sep 2014 07:26:32 +0300 > "Michael S. Tsirkin" wrote: > >> > >> > This commit prevents pseries to boot. SLOF complains with the following messages: >> > >> > Trying to load: from: /pci@800000020000000/scsi@0 ... virtioblk_read failed! status = 255 >> > virtioblk_read failed! status = 255 >> > virtioblk_read failed! status = 255 >> > ... >> > >> > I'll try to debug some more. >> > >> > > @@ -480,13 +469,18 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address, >> > > VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); >> > > VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus); >> > > >> > > + uint8_t cmd = proxy->pci_dev.config[PCI_COMMAND]; >> > > + >> > > pci_default_write_config(pci_dev, address, val, len); >> > > >> > > if (range_covers_byte(address, len, PCI_COMMAND) && >> > > !(pci_dev->config[PCI_COMMAND] & PCI_COMMAND_MASTER) && >> > > - !(proxy->flags & VIRTIO_PCI_FLAG_BUS_MASTER_BUG)) { >> > > + (cmd & PCI_COMMAND_MASTER)) { >> > > + /* Bus driver disables bus mastering - make it act >> > > + * as a kind of reset to render the device quiescent. */ >> > > virtio_pci_stop_ioeventfd(proxy); >> > > - virtio_set_status(vdev, vdev->status & ~VIRTIO_CONFIG_S_DRIVER_OK); >> > > + virtio_reset(vdev); >> > > + msix_unuse_all_vectors(&proxy->pci_dev); >> > > } >> > > } >> > > >> Regards Nikunj