On Mon, Jan 04, 2010 at 08:32:50AM +0100, Alexander Graf wrote: > +typedef void (*pci_config_reg_fn)(PCIHostState *s, uint32_t config_reg, > + PCIConfigAddress *conf); > +
pci_decode_config_addr_fn would be a better name. > struct PCIHostState { > SysBusDevice busdev; > + pci_config_reg_fn decode_config_reg; > + PCIConfigAddress config_reg_dec; decode_config_addr and config_addr would be better names > uint32_t config_reg; > PCIBus *bus; > }; > > void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len); > uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len); > +void pci_host_init(PCIHostState *s); > +void pci_host_decode_config_reg(PCIHostState *s, uint32_t config_reg, > + PCIConfigAddress *decoded); Shouldn't this be static? And again, pci_host_decode_config_addr would be a better name IMO. -- MST