• M
    virpci: Allow greater PCI domain value in virPCIDeviceAddressIsValid · d19c2142
    Michal Privoznik 提交于
    There is no restriction on maximum value of PCI domain. In fact,
    Linux kernel uses plain atomic inc when assigning PCI domains:
    
    drivers/pci/pci.c:static int pci_get_new_domain_nr(void)
    drivers/pci/pci.c-{
    drivers/pci/pci.c-      return atomic_inc_return(&__domain_nr);
    drivers/pci/pci.c-}
    
    Of course, this function is called only if kernel was compiled
    without PCI domain support or ACPI did not provide PCI domain.
    
    However, QEMU still has the same restriction as us: in
    set_pci_host_devaddr() QEMU checks if domain isn't greater than
    0xffff. But one can argue that that's a QEMU limitation. We still
    want to be able to cope with other hypervisors that don't have
    this limitation (possibly).
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: NJán Tomko <jtomko@redhat.com>
    d19c2142
virpci.c 92.8 KB