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

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain


  • To: Rahul Singh <rahul.singh@xxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Wed, 15 Sep 2021 11:55:25 +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; bh=aJ4furlTlTUdKoH9lwvuuuT37pwVAddPVfoym+Z5CPc=; b=OycMEN1WeAHLjHjQGco6wdY/jaNRYI9hMhBU72zfI8VQ8DBqTWeusyt267zpOxyldHyuB8J7K4D9wQc8vLtLcyPVy4MQkGZB/CvDFJ2gCv9aMH5MwLXGwjuM2miHslitnjDO+xkgXsOTbgMfddyNkCjFH9/GMlDVSnuJuLt9QzgQh5v1BJD0B83CG8w5GJOAtp6B0R49XhLRVopKhnukP119GJ866+VWhERG+ttxOS4iZYmG63y75Ai1M45KipO1OsIiuvUcIOizq3IyIx5W65YwTCHFth6pWhvtSZNPJzNa37gBCZnLGgUehsgjsl4QVzKnXIqCTAvRSsOXks6DsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PspGxfzzQLPU4lVATu3MAx+j3BmD/YDGx1RE0oblgM+SMpjfxBZh+uB9YGPdar+TN38sz2NmSu38pFWWeoxuxn732E2r0cEpr19AcPl4Bi43vcflLYfzFL13WoY9Urz6N5MsWNB5iQ32cXa0HS8pAz8JRdHk12bmIv7IthuS35kQ5YTt0KKQAcSuRe9Cx6vywEJusipS7vFXWodXms2Iz2KVp3PmIO4QpSsJvHZTszoCy6vAjWdz5YmyxCFBwqAHp7KVykBM13jnjXJxAp8Cw1k82RmvBQP0h0CquGAjWrIFzJhgzSDClPDWMONY77LdiTVjyWzItEO6KDZMHMT/dg==
  • Authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • Delivery-date: Wed, 15 Sep 2021 11:55:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXoJ6eIuPEzuAZLUmx1GA90MGEBKudvyQAgAXn/ACAAP1GAIAAWBmAgAATZQA=
  • Thread-topic: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

On 15.09.21 13:45, Rahul Singh wrote:
> Hi Oleksandr, Stefano,
>
>> On 15 Sep 2021, at 6:30 am, Oleksandr Andrushchenko 
>> <Oleksandr_Andrushchenko@xxxxxxxx> wrote:
>>
>> Hi, Rahul!
>>
>> On 14.09.21 17:24, Oleksandr Andrushchenko wrote:
>>> }
>>>>>    +static int pci_ecam_register_mmio_handler(struct domain *d,
>>>>> +                                          struct pci_host_bridge *bridge,
>>>>> +                                          const struct mmio_handler_ops 
>>>>> *ops)
>>>>> +{
>>>>> +    struct pci_config_window *cfg = bridge->sysdata;
>>>>> +
>>>>> +    register_mmio_handler(d, ops, cfg->phys_addr, cfg->size, NULL);
>>>>> +    return 0;
>>>>> +}
>>>> Given that struct pci_config_window is generic (it is not specific to
>>>> one bridge), I wonder if we even need the .register_mmio_handler
>>>> callback here.
>>>>
>>>> In fact,pci_host_bridge->sysdata doesn't even need to be a void*, it
>>>> could be a struct pci_config_window*, right?
>>> Rahul, this actually may change your series.
>>>
>>> Do you think we can do that?
>>>
>> This is the only change requested that left unanswered by now.
>>
>> Will it be possible that you change the API accordingly, so I can
>>
>> implement as Stefano suggests?
> We need pci_host_bridge->sysdata as void* in case we need to implement the 
> new non-ecam PCI controller in XEN.
> Please have a look once in Linux code[1] how bridge->sysdata will be used. 
> struct pci_config_window is used only for
> ecam supported host controller. Different PCI host controller will have 
> different PCI interface to access the PCI controller.
>
> [1] 
> https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/pcie-rcar-host.c*n309__;Iw!!GF_29dbcQIUBPA!mbI_iuu-laYQoUn36kKf3z2H4AyxR4J8C59CcKb21pLldyVnDaKbgJSQhZ4liEnwnAe2uzK8OA$
>  [git[.]kernel[.]org]
>
> I think we need bridge->sysdata in future to implement the new PCI controller.
>
> Regards,
> Rahul
Stefano, does it sound reasonable then to keep the above code as is?
>   
>> Thanks,
>>
>> Oleksandr

 


Rackspace

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