diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2010-06-17 09:15:02 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-06-22 15:15:51 -0500 |
commit | 8a911107386b5c7a78a629f0fe29381cf0ea5f6f (patch) | |
tree | e33728efc7fd993cf7269ababba66918aabfb28a /hw | |
parent | 511c0231033eb8fbdf2a615b429e1bc6b5aad52c (diff) | |
download | qemu-8a911107386b5c7a78a629f0fe29381cf0ea5f6f.zip qemu-8a911107386b5c7a78a629f0fe29381cf0ea5f6f.tar.gz qemu-8a911107386b5c7a78a629f0fe29381cf0ea5f6f.tar.bz2 |
virtio-pci: fix bus master bug setting on load
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>
Diffstat (limited to 'hw')
-rw-r--r-- | 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 9accb77..d1303b1 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; } |