• D
    Detect PCI addresses at QEMU startup · 989051a8
    Daniel P. Berrange 提交于
    Hotunplug of devices requires that we know their PCI address. Even
    hotplug of SCSI drives, required that we know the PCI address of
    the SCSI controller to attach the drive to. We can find this out
    by running 'info pci' and then correlating the vendor/product IDs
    with the devices we booted with.
    
    Although this approach is somewhat fragile, it is the only viable
    option with QEMU < 0.12, since there is no way for libvirto set
    explicit PCI addresses when creating devices in the first place.
    For QEMU > 0.12, this code will not be used.
    
    * src/qemu/qemu_driver.c: Assign all dynamic PCI addresses on
      startup of QEMU VM, matching vendor/product IDs
    * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
      src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
      src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
      API for fetching PCI device address mapping
    989051a8
qemu_driver.c 266.0 KB