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

Re: [PATCH v2 05/11] xen/arm: Mark device as PCI while creating one


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Mon, 27 Sep 2021 08:45:36 +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=hGETNBeow91mbr0JYZi6wOx7KspMQktzcVUBI+Y7uN8=; b=kt/yFDcajnTyOGcIBgk+FgGriBei+LDDH3dq8Kpnq4/3dDPZrNfQd/gfYzTgNP+NYXIzr0bWiqQXlnwj9XaGPDUu4ZeqXu+vo0mtXsyPoglQA7KEvoAki+ywd9GNIHQYxAmQYFHKT4zJpYO+uQvSWWeG3ft1oPeF+wJGRI0e1Ty8TTjOqljKrND3h4bc2C8cLk8Azwpk3ppqduA62P+lFsiw9cVtVas9m9LrPXQuHvD3L/4MUkrPlw9L2sR6He2xiKgzZc6ffHSO0aAWWnJyN7NE8uBtv66LrSVR/GdfXFyDhBHKKXFL9+nASCjgjU4FE8PQzsn4NZwe4Z+maIdexw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QVhr9Xj/lvjEnR49097+K07D8vDTz0C2UUVQZkINwgfevutkYViotzKKqgmNT7KCrW6YsnSeAfHdFi7GSvmC0hU2Rfk+N/1KAIwm0WznSqQH6nf8jkI9OqVF+eu3SfbEAL5tZ9WYZD7v78rTVBKEVXnX+jv0xvOH7/5PHxGpxIBFzEI3IwcVBvgXtyZpkIjuD1oEMeCAec6B9ClItdrKxLpflmptKJWY3nIrO0T00PpuqzM0o4wX10JacGtSAI4if66z0EW879Nzug4HTwzfpYMl9EpBhlBY4ScbWZeCxtkxnMThi+gm2h/z0LrFAoHSp0c94vxzYV0E/J3Ek/MdyQ==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
  • Cc: "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <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>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 27 Sep 2021 08:45:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXsHoyHtx3VKSfZEKPQekyrs7GEau3hnIAgAAQrIA=
  • Thread-topic: [PATCH v2 05/11] xen/arm: Mark device as PCI while creating one

On 27.09.21 10:45, Jan Beulich wrote:
> On 23.09.2021 14:54, Oleksandr Andrushchenko wrote:
>> --- a/xen/drivers/passthrough/pci.c
>> +++ b/xen/drivers/passthrough/pci.c
>> @@ -328,6 +328,9 @@ static struct pci_dev *alloc_pdev(struct pci_seg *pseg, 
>> u8 bus, u8 devfn)
>>       *((u8*) &pdev->bus) = bus;
>>       *((u8*) &pdev->devfn) = devfn;
>>       pdev->domain = NULL;
>> +#ifdef CONFIG_ARM
>> +    pci_to_dev(pdev)->type = DEV_PCI;
>> +#endif
> I have to admit that I'm not happy about new CONFIG_<arch> conditionals
> here. I'd prefer to see this done by a new arch helper, unless there are
> obstacles I'm overlooking.

Do you mean something like arch_pci_alloc_pdev(dev)?

If so, where should we put this call? At the very beginning of alloc_pdev

or at the bottom just before returning from alloc_pdev?

>
> Jan
>
Thank you,

Oleksandr

 


Rackspace

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