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

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


  • To: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 3 Sep 2021 14:41:23 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=EbrS5Qs1UIXDzktuDY0e79UHyHoqnt/wbQv5dVhWme4=; b=MtXi8j+n+Rsyn1wjfYVoO9O2Za/S3EceM7KDmDB1w6r83oMMYODtokGtdh3HC0O+duYYOOZTzleE/ZghupwPRYjRd2y4eI6v6l+ReB1G7Vz3qTFiQ4OnTotR2xx5rX2PsuLf2EbLu48ppEsfONMIvS5APETV91P+zYDZVub/71RAEZggLtRGnWwreGmGiqCxIC4uiaC+h3gDnGIKSAU0nX7Zr+F1HoSYQz86dmHR7XYjx7qRv15zCYk4H3F8VWYriaHwhFAL4Kn2LWi33S0l9wHcddGMjC1IrdIrK0Z7cKvk7qnMqXBPlBKp+6prz708+TKikx7/fI5xBP8ZIdj/jA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cjWebvd6BgjtC+0LvqsHTUHOHb8rx5hON3KQeKXN5d2vNjiYgabJWbI3XCx3ST9of4AgwHqLWepzO+7fcWLJ2coIdLG30zWqY/m5rZLB0aEM6+QeEModsU42xiDlzWSDqhU9Zq48IxzorvaEOqSkVCoHs47Qp5d4K9U22jnf/MC40AihSUJuyqmcWfd1CINvv2yMpOI4Sb02IwmXKEoAFwF2DjKZS/lB42W5DS53SIpeukvXKxRbyDAC5GBbQb86LhZBfhURcA9emgOhC3ggtI8RRovtYU1k9rOHeMTEgA3PmBD0bbGY4O2u1MQ+1fUgVoT64BlwmYnBwg+bNYSFpg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, sstabellini@xxxxxxxxxx, oleksandr_tyshchenko@xxxxxxxx, volodymyr_babchuk@xxxxxxxx, Artem_Mygaiev@xxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, rahul.singh@xxxxxxx, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 03 Sep 2021 12:41:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.09.2021 10:33, Oleksandr Andrushchenko wrote:
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1301,6 +1301,9 @@ static int iommu_add_device(struct pci_dev *pdev)
>      if ( !is_iommu_enabled(pdev->domain) )
>          return 0;
>  
> +#ifdef CONFIG_ARM
> +    pci_to_dev(pdev)->type = DEV_PCI;
> +#endif

Why here instead of in alloc_pdev()? The field should be valid by the time
the new item gets inserted into the segment's list of devices, imo.

Jan




 


Rackspace

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