Isaku Yamahata <yamah...@valinux.co.jp> wrote: > Set PCI multi-function bit according to multifunction property. > PCI address, devfn ,is exported to users as addr property, > so users can populate pci function(PCIDevice in qemu) > at arbitrary devfn. > It means each function(PCIDevice) don't know whether pci device > (PCIDevice[8]) is multi function or not. > So this patch allows user to set multifunction bit via property > and checks whether multifunction bit is set correctly.
[...] > @@ -629,6 +668,9 @@ static PCIDevice *do_pci_register_device(PCIDevice > *pci_dev, PCIBus *bus, > if (is_bridge) { > pci_init_wmask_bridge(pci_dev); > } > + if (pci_init_multifunction(bus, pci_dev)) { > + return NULL; > + } Don't we have here a mem leak? what frees what pci_config_alloc() assignates in the error case? Later, Juan.