• L
    qemu: assign nec-xhci (USB3) controller to a PCIe address when appropriate · 5266426b
    Laine Stump 提交于
    The nec-usb-xhci device (which is a USB3 controller) has always
    presented itself as a PCI device when plugged into a legacy PCI slot,
    and a PCIe device when plugged into a PCIe slot, but libvirt has
    always auto-assigned it to a legacy PCI slot.
    
    This patch changes that behavior to auto-assign to a PCIe slot on
    systems that have pcie-root (e.g. Q35 and aarch64/virt).
    
    Since we don't yet auto-create pcie-*-port controllers on demand, this
    means a config with an nec-xhci USB controller that has no PCI address
    assigned will also need to have an otherwise-unused pcie-*-port
    controller specified:
    
       <controller type='pci' model='pcie-root-port'/>
       <controller type='usb' model='nec-xhci'/>
    
    (this assumes there is an otherwise-unused slot on pcie-root to accept
    the pcie-root-port)
    5266426b
qemuxml2xmltest.c 34.2 KB