From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUMhI-00040c-MI for qemu-devel@nongnu.org; Mon, 11 Jan 2010 11:00:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUMhD-00040K-8z for qemu-devel@nongnu.org; Mon, 11 Jan 2010 11:00:51 -0500 Received: from [199.232.76.173] (port=56639 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUMhD-00040H-3S for qemu-devel@nongnu.org; Mon, 11 Jan 2010 11:00:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46537) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUMhC-0002hB-D2 for qemu-devel@nongnu.org; Mon, 11 Jan 2010 11:00:46 -0500 Date: Mon, 11 Jan 2010 17:57:41 +0200 From: "Michael S. Tsirkin" Message-ID: <20100111155739.GA8588@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] virtio-pci: thinko fix List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, aliguori@us.ibm.com, yvugenfi@redhat.com Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will sometimes clear all status registers on bus master disable, which loses information such as VIRTIO_CONFIG_S_FAILED bit. This is a result of a patch being misapplied: code uses ! instead of ~ for bit operations as in Yan's original patch. This obviously does not make sense. Signed-off-by: Michael S. Tsirkin --- 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 d222ce0..f4f1bc1 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -374,7 +374,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address, if (PCI_COMMAND == address) { if (!(val & PCI_COMMAND_MASTER)) { - proxy->vdev->status &= !VIRTIO_CONFIG_S_DRIVER_OK; + proxy->vdev->status &= ~VIRTIO_CONFIG_S_DRIVER_OK; } } -- 1.6.6.rc1.43.gf55cc