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

Re: [PATCH 08/10] vpci/arm: Allow updating BAR's header for non-ECAM bridges


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 13 Nov 2020 06:46:20 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=40kjv/gLIKIGd/U6WL74IHsixNEKP4c9f6m8MAZkQos=; b=cztqLow8LE0Dpuu5JXxfeK2R94tvZ75ewvBhqXJXjbP4Qk4IytZHmlWnyL+aVcYMMwlMY065F+lNpNL1dLBhZi28L1AHjBHt9kEBzQfzfjtLAK5FqAR6q9NMshar8lWp6qiL0kCh5YFdvhk+GqBQYoa+1AZ+apZSSJ+zlEFYkp3fEHMPekDhmLSXnNCZXJyzpg8EdxbQO1C5WFoSis11C9/RAghsNpOQWr4Nk2LhwEFk/rqLtCLce3c/44ZRYkBOqIk/lOY+qshMsU5StZhjjnk9McmGlS8M874laaxORyKdtK2JcSOU0VradtfN+YbIX0gYqHVLXe03TGbWeB7ZCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dYElHk+R4TeYoY6YzLS8xIstAA+HsjDH9p1bxSNI0s+Blk5t21ciSDIQG6xXuqZX9pSIj36yXFEYg1j7D1kz5dplNMGp0Pjl90AQsv1JQAcnI0WUylhhrG5b+Xavy7ra9oaV+cDXi/zpAHG+PqqWKLdQM+SJieIxnlllzFz5/F576p0u9cdHpnEMKVT2xcRl9Yu52us5Ex8c/q9kcXLmyz2BeVuQZMoMS79YnC8xPkNX6yl97ZhepF1tcsKPUiMdcV9KhNEGyI4Ui6YbN5iSVPYYYfdtiMPgdbrUgYrcQPnqTetDzzrYbCUbZ9ogqTGMt0ciiCrj6NmWddCvL1XxIA==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=epam.com;
  • Cc: "Rahul.Singh@xxxxxxx" <Rahul.Singh@xxxxxxx>, "Bertrand.Marquis@xxxxxxx" <Bertrand.Marquis@xxxxxxx>, "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>
  • Delivery-date: Fri, 13 Nov 2020 06:46:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWtpbyYHzQ7b7gKkKm7jsDdoAEE6nERvEAgAFdRAA=
  • Thread-topic: [PATCH 08/10] vpci/arm: Allow updating BAR's header for non-ECAM bridges

On 11/12/20 11:56 AM, Roger Pau Monné wrote:
> On Mon, Nov 09, 2020 at 02:50:29PM +0200, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>>
>> Non-ECAM host bridges in hwdom go directly to PCI config space,
>> not through vpci (they use their specific method for accessing PCI
>> configuration, e.g. dedicated registers etc.). Thus hwdom's vpci BARs are
>> never updated via vPCI MMIO handlers, so implement a dedicated method
>> for a PCI host bridge, so it has a chance to update the initial state of
>> the device BARs.
>>
>> Note, we rely on the fact that control/hardware domain will not update
>> physical BAR locations for the given devices.
> This is quite ugly.
It is
>
> I'm looking at the commit that implements the hook for R-Car and I'm
> having trouble seeing how that's different from the way we would
> normally read the BAR addresses.

Ok, please see my comment on patch [06/10]. In short:

when a PCI device is *added* we call init_bars and at that time BARs

are not assigned on ARM yet. But, if we move init_bars to the point

when a device *assigned* then it will work? And this code will go away

>
> I think this should likely be paired with the actual implementation of
> a hook, or else it's hard to tell whether it really needed or not.
Yes, if we move to device assign then it won't be needed: have to check that
>
> Thanks, Roger.

Thank you,

Oleksandr

 


Rackspace

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