Isaku Yamahata wrote: > On Tue, Jan 12, 2010 at 12:12:36PM +0200, Michael S. Tsirkin wrote: > >> On Tue, Jan 12, 2010 at 05:52:58PM +0900, Isaku Yamahata wrote: >> >>> diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c >>> index d99b7fa..14a728a 100644 >>> --- a/hw/versatile_pci.c >>> +++ b/hw/versatile_pci.c >>> @@ -23,11 +23,29 @@ static inline uint32_t >>> vpb_pci_config_addr(target_phys_addr_t addr) >>> return addr & 0xffffff; >>> } >>> >>> +static void vpb_pci_data_write(PCIHostState *s, target_phys_addr_t addr, >>> + uint32_t val, int len) >>> +{ >>> + PCIConfigAddress conf_addr; >>> + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr), >>> + &conf_addr); >>> + pci_data_write(&conf_addr, 0, val, len); >>> +} >>> + >>> +static uint32_t vpb_pci_data_read(PCIHostState *s, target_phys_addr_t addr, >>> + int len) >>> +{ >>> + PCIConfigAddress conf_addr; >>> + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr), >>> + &conf_addr); >>> + return pci_data_read(&conf_addr, 0, len); >>> +} >>> + >>> >> I thought we will get rid of vpb_pci_config_addr, and fill in >> fields in PCIConfigAddress directly. If we don't, and still >> recode into PC format, this is not making code any prettier >> so I don't really see what this buys us. >> > > I should have explain my plan. > > After introducing decode callback by Alexander patch, > I'd like to remove them. > I was waiting for his respin, but he seems to be busy. > So I created this patch series to make his respin easier (hopefully). > For that sake, I kept the original structures. > > I'm fine with either ways. Waiting for his patch merged or > make this patch series into shape. >
Oh, I guess I read this mail too late. Sorry about that :-). Alex