> On 24 Jul 2020, at 9:05 am, Julien Grall <jul...@xen.org> wrote:
> 
> Hi,
> 
> On 24/07/2020 08:03, Oleksandr Andrushchenko wrote:
>>>> diff --git a/xen/arch/arm/pci/pci-access.c b/xen/arch/arm/pci/pci-access.c
>>>> new file mode 100644
>>>> index 0000000000..c53ef58336
>>>> --- /dev/null
>>>> +++ b/xen/arch/arm/pci/pci-access.c
>>>> @@ -0,0 +1,101 @@
>>>> +/*
>>>> + * Copyright (C) 2020 Arm Ltd.
>> I think SPDX will fit better in any new code.
> 
> While I would love to use SPDX in Xen, there was some push back in the past 
> to use it. So the new code should use the full-blown copyright until there is 
> an agreement to use it.

Ack. We will use the copyright until we will get the confirmation from the 
community to use the SPDX in XEN.
> 
>>> 
>>>> +    list_add_tail(&bridge->node, &pci_host_bridges);
>>> It looks like &pci_host_bridges should be an ordered list, ordered by
>>> segment number?
>> Why? Do you expect bridge access in some specific order so ordered
>> list will make it faster?
> 
> Access to the configure space will be pretty random. So I don't think 
> ordering the list will make anything better.
> 
> However, looking up for the bridge for every config spec access is pretty 
> slow. When I was working on the PCI passthrough, I wanted to look whether it 
> would be possible to have a pointer to the PCI host bridge passed in argument 
> to the helpers (rather than the segment).

Yes true every config space access has to scan the host-bridges list to find 
the corresponding host-bridge. I will try to find better solution so that no 
need to scan the host-bridge every time for read/write access.


> Cheers,
> 
> -- 
> Julien Grall


Reply via email to