qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] pci: add standard bridge device


From: Wen Congyang
Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device
Date: Thu, 08 Sep 2011 17:58:12 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4

At 09/08/2011 05:43 PM, Gerd Hoffmann Write:
>   Hi,
> 
>> I modify the code like this, and the PCI_INTERRUPT_LINE register is
>> set, and I can bind
>> it to uio_pci_generic:
> 
>> --- a/src/pciinit.c
>> +++ b/src/pciinit.c
>> @@ -575,6 +575,8 @@ static int pci_bios_init_root_regions(u32 start,
>> u32 end)
> 
>>       pci_bios_init_bus_bases(&busses[0]);
>> -    pci_bios_map_device_in_bus(0 /* host bus */);
>> +    for (bus = 0; bus<= MaxPCIBus; bus++) {
>> +        pci_bios_map_device_in_bus(bus /* host bus */);
> 
> No.  pci_bios_map_device_in_bus goes down recursively when it finds a
> bridge, so it should cover all devices already.

Yes, pci_bios_map_device() goes down recursively.

> 
>> -    pci_bios_init_device_in_bus(0 /* host bus */);
>> +        pci_bios_init_device_in_bus(bus /* host bus */);
>> +    }
> 
> That is correct.  Can be done easier though by just not limiting device
> initialization to a specific bus like in the attached patch.  Does that
> one work for you?

I test it, and it works for me.

Thanks
Wen Congyang

> 
> cheers,
>   Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]