]> git.proxmox.com Git - mirror_qemu.git/commitdiff
virtio-pci: fix bus master bug setting on load
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 17 Jun 2010 15:15:02 +0000 (09:15 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 22 Jun 2010 20:15:51 +0000 (15:15 -0500)
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 <alex.williamson@redhat.com>
Found-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-pci.c

index 9accb77ee55cfc474d0686e3097b22dde1ab556f..d1303b1a388ed077bf1cd30f873bec7332465cd0 100644 (file)
@@ -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;
     }