From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33689 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORF4O-0002Pi-QZ for qemu-devel@nongnu.org; Tue, 22 Jun 2010 21:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORF4N-0006ls-9P for qemu-devel@nongnu.org; Tue, 22 Jun 2010 21:48:04 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:53828) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORF4M-0006k3-WA for qemu-devel@nongnu.org; Tue, 22 Jun 2010 21:48:03 -0400 Received: by mail-gw0-f45.google.com with SMTP id 19so1123582gwb.4 for ; Tue, 22 Jun 2010 18:48:02 -0700 (PDT) Message-ID: <4C2167D0.3050703@codemonkey.ws> Date: Tue, 22 Jun 2010 20:48:00 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] virtio-pci: fix bus master bug setting on load References: <20100617151502.9916.3597.stgit@localhost.localdomain> In-Reply-To: <20100617151502.9916.3597.stgit@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: amit.shah@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, agraf@suse.de On 06/17/2010 10:15 AM, Alex Williamson wrote: > The comment suggests we're checking for the driver in the ready > state and bus master disabled, but the code is checking that it's > not in the ready state. > > Signed-off-by: Alex Williamson > Found-by: Amit Shah > Applied. Thanks. Regards, Anthony Liguori > --- > > hw/virtio-pci.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index e101fa0..7a86a81 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -155,7 +155,7 @@ static int virtio_pci_load_config(void * opaque, QEMUFile *f) > > /* Try to find out if the guest has bus master disabled, but is > in ready state. Then we have a buggy guest OS. */ > - if (!(proxy->vdev->status& VIRTIO_CONFIG_S_DRIVER_OK)&& > + if ((proxy->vdev->status& VIRTIO_CONFIG_S_DRIVER_OK)&& > !(proxy->pci_dev.config[PCI_COMMAND]& PCI_COMMAND_MASTER)) { > proxy->bugs |= VIRTIO_PCI_BUG_BUS_MASTER; > } > > > >