[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/6] iommu/arm: Introduce iommu_add_dt_pci_sideband_ids API
- To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 19 May 2023 10:45:55 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/8nyHlQZBJinqOl3PekLKCUs6CLB2n9F7EIZ9hgRSzE=; b=feoUbBPxjNNbMVy0xisEqy/Jp5fK6VwKLY1lK3dZHMyY7llXIDLEWx94tWKR+Qak7ejNIdR+huAJsLagNxiqNg6DbHsbiW5SOnahu+VpFo/TJOCwwSf8FxesAan2Q8WG4NNVsAb2XQEvCYxA8JCU4pAwnLkPNhKTazRRdjmBu69e1+6epzn2tLrzW56b3pmM+07b661F02qOYyTfpyr8kUyig6ekhodmSjy4EtQ6x29HssRRzzfvqrciYxdFiePaVIAA6BULruomL3xBL9HFwFK1cfAELPoT61jpnDQ9SracVkirx2oN5Ipk9E8/uup7blEBWd5zWHVZV096C5aMVg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+bOzZdLdyXKzqNbOthwJs0ikvle9iktmbN/c43l0P0yMk9kBAnLJfHA4KeGh04cbVidLIxOHQ+uHGsVnjCmJoJYrMd9w2ArcuMH/JfjP3TnAq9ze37NS+4NRk3Ug8XDCT5wiFTZXF/V/SJbp0gmTpWzQP/CrjjM++eeG+gXtS7z5QQpSoRFzOka3q81nwvMyHBip/6jjjyqXy3yFrQU4NAW0eh3AfMdEc+H/EnyzIc9kv3tYrLtm0rFn767swew4fgTYoH1lSgg5WLXGdG+IGIiLa6OILhoEd99qKgMFCA7lQd+TZSE/xIu3vht1nuvuLd0y25NNddCi8UAsQshAA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- 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: Fri, 19 May 2023 08:46:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.05.2023 23:06, Stewart Hildebrand wrote:
> --- a/xen/include/xen/iommu.h
> +++ b/xen/include/xen/iommu.h
> @@ -26,6 +26,7 @@
> #include <xen/spinlock.h>
> #include <public/domctl.h>
> #include <public/hvm/ioreq.h>
> +#include <asm/acpi.h>
> #include <asm/device.h>
I view this as problematic: It'll require all architectures with an
IOMMU implementation to have an asm/acpi.h. I think this wants to go
inside an "#ifdef CONFIG_ACPI" and then ...
> @@ -228,12 +230,25 @@ 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)
> +{
> + if ( acpi_disabled )
... the same #ifdef would be added around this if().
All of this of course only if this is deemed enough to allow co-existance
of DT and ACPI (which I'm not convinced it is, but I don't know enough
about DT and e.g. possible mixed configurations).
Jan
> + return iommu_add_dt_pci_sideband_ids(pdev);
> + return 0;
> +}
> +
> struct page_info;
>
> /*
|