• C
    pciResetDevice: use inactive devices to determine safe reset · 46bcdb96
    Chris Wright 提交于
    When doing a PCI secondary bus reset, we must be sure that there are no
    active devices on the same bus segment.  The active device tracking is
    designed to only track host devices that are active in use by guests.
    This ignores host devices that are actively in use by the host.  So the
    current logic will reset host devices.
    
    Switch this logic around and allow sbus reset when we are assigning all
    devices behind a bridge to the same guest at guest startup or as a result
    of a single attach-device command.
    
    * src/util/pci.h: change signature of pciResetDevice to add an
      inactive devices list
    * src/qemu/qemu_driver.c src/xen/xen_driver.c: use (or not) the new
      functionality of pciResetDevice() depending on the place of use
    * src/util/pci.c: implement the interface and logic changes
    46bcdb96
qemu_driver.c 390.4 KB