]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pciSharesBusWithActive fails to find multiple devices on bus
authorChris Wright <chrisw@redhat.com>
Fri, 23 Jul 2010 09:25:24 +0000 (11:25 +0200)
committerDaniel Veillard <veillard@redhat.com>
Fri, 23 Jul 2010 09:25:24 +0000 (11:25 +0200)
commitf4828ca353aabd559f196cedbca1daecf4e0609b
tree5b14b72f797f301bd87223c15f588e95075f6784
parent8d4f02422142ebdd63fb568d9def462c68358623
pciSharesBusWithActive fails to find multiple devices on bus

The first conditional is always true which means the iterator will
never find another device on the same bus.

    if (dev->domain != check->domain ||
        dev->bus != check->bus ||
  ----> (check->slot == check->slot &&
         check->function == check->function)) <-----

The goal of that check is to verify that the device is either:

  in a different pci domain
  on a different bus
  is the same identical device

This means libvirt may issue a secondary bus reset when there are
devices
on that bus that actively in use by the host or another guest.

* src/util/pci.c: fix a bogus test in pciSharesBusWithActive()
src/util/pci.c