• L
    qemu: add host-pci-multidomain capability · 17133e37
    Laine Stump 提交于
    Quite a long time ago, (apparently between qemu 0.12 and 0.13) qemu
    quietly began supporting the optional specification of a domain in the
    host-side address of all pci passthrough commands (by simply
    prepending it to the bus:slot.function format, as
    "dddd:bb:ss.f"). Since machines with multiple PCI domains are very
    rare, this never came up in practice, so libvirt was never updated to
    support it.
    
    This patch takes the first step to supporting specification of a non-0
    domain in the host-side address of PCI devices being assigned to a
    domain, by adding a capability bit to indicate support
    "QEMU_CAPS_HOST_PCI_MULTIDOMAIN", and detect it. Since this support
    was added in a version prior to the minimum version required for
    QMP-style capabilities detection, the capability is always enabled for
    any qemu that uses QMP for capabilities detection. For older qemus,
    the only clue that a domain can be specified in the host pci address
    is the presence of the string "[seg:]" in the help string for
    -pcidevice. (Ironically, libvirt will not be modified to support
    specification of domain for -pcidevice, since any qemu new enough for
    us to care about also supports "-device pci-assign" or "-device
    vfio-pci", which are greatly preferred).
    17133e37
qemu_capabilities.c 103.2 KB