On Fri, Jul 16, 2010 at 10:46:52AM +0900, Isaku Yamahata wrote: > On Thu, Jul 08, 2010 at 07:49:35PM +0300, Michael S. Tsirkin wrote: > > > > For root bus: > > > - pci_host_bus_new()/pci_host_bus_new_inplace() > > > qbus style api. pci segment must be specified. > > > New code should use this. > > > > I'd prefer a simple _init which works like _inplace. > > Allocating memory is simple enough for users. > > How about the following patch? > - replaced pci_bus_new(), pci_bus_new_inplace() with > pci_host_bus_init()/pci_host_bus_cleanup() > - eliminated memory allocation by embedding PCIBus into PCIHostState. > I've tested it with only piix4 yet. > If this direction is okay, I'll give it more tests and post it. >
Looks good to me. What do others think? Let's also make pci_host_bus_init_simple inline. -- MST