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

Re: [RFC PATCH v1 1/4] arm/pci: PCI setup and PCI host bridge discovery within XEN on ARM.


  • To: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Mon, 27 Jul 2020 15:27:21 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abeDaZp8PSQysPOwTzxejPKX3OzNPTMntkedkWl94oI=; b=Cyt2b4obKmNf300HSiiDVFbpJq4K/DguRk79to4mF/x0Vr9pQu1qNgfKstwYjn0JSo6jRfchp7Iik1ql+ZITvW53VMqxKX1YMWkb0wpywAiD1R/qT8wIF6xJTcvhEIc3U2WOrXwx5CqrTnm23jjP+low8lUoxb4+reP9iEbEzKQg179eXt4V8XCMLH8zi8scSLoCXYZZrAJvbYLxs2beqcx+bK1lbSy17Jf4u9LkGvqGTEcfFH14hnnPbBJ4VIDDOGkRbWbonEgliA57zm2DyUfjBhtx7/sx6MQeShEhSkGj06EM84Nimm51OarBUWKGo0pLFxmABNZrOBsey0lWfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGJXncQrcc2rL8cwgTJajPLX3v0fwsNSWwFBbkicWHb8tcyEMAjN9fnmUSoUGaRA+BdiiWfSzD+4QpbbQHC0+w78eKQfhNVn2rVM69HLTi3rELzfKv0poqIv7fHMHL9jCjN81ONVGnklF3w+w/xc5augBNwIMPIFbKsblGSjnXLf74Gedcn7snsa+VliG8Du5XzmjVdMaSmMVuufevgb0nI5UyNG7dfEW4hTGTK/SLM3W5Ck4gBh93PEh/r+N/PjGpGZfmZvSdOZw5tm1r8ublIPes4JsupiwGBRpJrAKk/N5du5M2NcZdoxLf+HAeeoCvOvC8pH7Njl51wAI1TxmQ==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, nd <nd@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 27 Jul 2020 15:27:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWYPbO0TX+B10vbkuLRSjkBERSxqkV0u2AgAB8NICAABFdAIAFMmuA
  • Thread-topic: [RFC PATCH v1 1/4] arm/pci: PCI setup and PCI host bridge discovery within XEN on ARM.


> On 24 Jul 2020, at 9:05 am, Julien Grall <julien@xxxxxxx> 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.