You need to sign in or sign up before continuing.
  • L
    qemu: set/use info->pciConnectFlags when validating/assigning PCI addresses · 7f784f57
    Laine Stump 提交于
    Set pciConnectFlags in each device's DeviceInfo and then use those
    flags later when validating existing addresses in
    qemuDomainCollectPCIAddress() and when assigning new addresses with
    qemuDomainPCIAddressReserveNextAddr() (rather than scattering the
    logic about which devices need which type of slot all over the place).
    
    Note that the exact flags set by
    qemuDomainDeviceCalculatePCIConnectFlags() are different from the
    flags previously set manually in qemuDomainCollectPCIAddress(), but
    this doesn't matter because all validation of addresses in that case
    ignores the setting of the HOTPLUGGABLE flag, and treats PCIE_DEVICE
    and PCI_DEVICE the same (this lax checking was done on purpose,
    because there are some things that we want to allow the user to
    specify manually, e.g. assigning a PCIe device to a PCI slot, that we
    *don't* ever want libvirt to do automatically. The flag settings that
    we *really* want to match are 1) the old flag settings in
    qemuDomainAssignDevicePCISlots() (which is HOTPLUGGABLE | PCI_DEVICE
    for everything except PCI controllers) and 2) the new flag settings
    done by qemuDomainDeviceCalculatePCIConnectFlags() (which are
    currently exactly that - HOTPLUGGABLE | PCI_DEVICE for everything
    except PCI controllers).
    7f784f57
qemu_domain_address.c 77.2 KB