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

Re: [PATCH v4 4/7] iommu/arm: Introduce iommu_add_dt_pci_sideband_ids API


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 7 Jun 2023 08:45:00 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WsGl4ktTBObDoB/1wlaqLnmqeysCIlQV0YUZkEaCR84=; b=BZK7WBVDkRmuNpeODEZlQcsZu1Rh0qsvf78cKFTGZJwILArbS6UDa5q3z2Ev2kb3+imj+tW+M1Wq1h6e5rRhBt5+4uAxQQuHMyUp++hoKPHwIuTpGI4v/zwVfPSIm2WgrAg0bOgh3tmc6N04aOz1R5wKcFgEc7jgWgCsQeFPrNYOr8ejYP99Iqk003DehdnFf+HF4q9pLsFPQVHZRlcgzHk0OLvHbBnobMTcYx5INSoPhh3iXB6YT5IgGZNUgFhBe9HgBm/e/Dwi+XEei+mABrIE7+hCxF/V1TYllYiiiqKelEKpS6xMWKex0iXLuabBqc+T5o+5fB1jrowBnseDcQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kx5+lDXf3BOu0sWhUd/0EiZOi7u70OR4ffCT4ezayVCQKfthLstGuxc6v8Y+ucnbo63U5kVcLABucPHnd44JjeJe26XF71ffaqrluG8Xtgg3NCbiM0xHKLyuhmAsMCUXdzGxWILS5aD79QAxbQpBkiHK3IzFhtKINXnI6IUgr1Nh/Zev/CHIFvNdEA+k5PeI8pjY+c5FM8iLpm/rilradQ1oy+hNAkrPWQHh0cFJMF8/zsyf5xVcppj6461mdTKswM3psz/FuMSdMeM3azqOiEGaVpGVm1sllCMlQwW/kXn/0fw8I3RdHtD82+NcDa71NC+G8llcM3ehdXXzxEenUg==
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 07 Jun 2023 12:45:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 6/7/23 03:59, Jan Beulich wrote:
> On 07.06.2023 05:02, Stewart Hildebrand wrote:
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -26,6 +26,9 @@
>>  #include <xen/spinlock.h>
>>  #include <public/domctl.h>
>>  #include <public/hvm/ioreq.h>
>> +#ifdef CONFIG_ACPI
>> +#include <asm/acpi.h>
>> +#endif
> 
> This header is supposed to be usable without #ifdef, and then ...

You suggested adding the #ifdef

https://lists.xenproject.org/archives/html/xen-devel/2023-05/msg01409.html

Please clarify

>> @@ -228,12 +232,28 @@ int iommu_release_dt_devices(struct domain *d);
>>   *      (IOMMU is not enabled/present or device is not connected to it).
>>   */
>>  int iommu_add_dt_device(struct dt_device_node *np);
>> +int iommu_add_dt_pci_sideband_ids(struct pci_dev *pdev);
>>
>>  int iommu_do_dt_domctl(struct xen_domctl *, struct domain *,
>>                         XEN_GUEST_HANDLE_PARAM(xen_domctl_t));
>>
>> +#else /* !HAS_DEVICE_TREE */
>> +static inline int iommu_add_dt_pci_sideband_ids(struct pci_dev *pdev)
>> +{
>> +    return 0;
>> +}
>>  #endif /* HAS_DEVICE_TREE */
>>
>> +static inline int iommu_add_pci_sideband_ids(struct pci_dev *pdev)
>> +{
>> +    int ret = 0;
>> +#ifdef CONFIG_ACPI
>> +    if ( acpi_disabled )
>> +#endif
> 
> ... you don't need #ifdef here either.
> 
>> +        ret = iommu_add_dt_pci_sideband_ids(pdev);
>> +    return ret;
>> +}
> 
> Also (nit) please follow (partly unwritten, I admit) style guidelines:
> A blank line between declaration(s) and statement(s), and another one
> ahead of a function's main "return".

OK



 


Rackspace

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