Displaying 20 results from an estimated 85 matches for "fwnode".
2019 Nov 22
0
[RFC 08/13] ACPI/IORT: Add callback to update a device's fwnode
For a PCI-based IOMMU, IORT isn't in charge of allocating a fwnode. Let
the IOMMU driver update the fwnode associated to an IORT node when
available.
Signed-off-by: Jean-Philippe Brucker <jean-philippe at linaro.org>
---
drivers/acpi/iort.c | 38 ++++++++++++++++++++++++++++++++++++++
include/linux/acpi_iort.h | 4 ++++
2 files changed, 42 insertion...
2019 Nov 22
0
[RFC 06/13] ACPI/IORT: Support VIOT virtio-pci node
When virtio-iommu uses the PCI transport, IORT doesn't instantiate the
device and doesn't create a fwnode. They will be created later by the
PCI subsystem. Store the information needed to identify the IOMMU in
iort_fwnode_list.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker at arm.com>
---
drivers/acpi/iort.c | 117 +++++++++++++++++++++++++++++++++++---------
1 file changed, 93 in...
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
...I/IORT: Move IORT to the ACPI folder
ACPI: Add VIOT definitions
ACPI/IORT: Allow registration of external tables
ACPI/IORT: Add node categories
ACPI/IORT: Support VIOT virtio-mmio node
ACPI/IORT: Support VIOT virtio-pci node
ACPI/IORT: Defer probe until virtio-iommu-pci has registered a fwnode
ACPI/IORT: Add callback to update a device's fwnode
iommu/virtio: Create fwnode if necessary
iommu/virtio: Update IORT fwnode
ACPI: Add VIOT table
MAINTAINERS | 9 +
drivers/acpi/Kconfig | 7 +
drivers/acpi/Makefile | 2 +
drivers/acpi/ar...
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
...I/IORT: Move IORT to the ACPI folder
ACPI: Add VIOT definitions
ACPI/IORT: Allow registration of external tables
ACPI/IORT: Add node categories
ACPI/IORT: Support VIOT virtio-mmio node
ACPI/IORT: Support VIOT virtio-pci node
ACPI/IORT: Defer probe until virtio-iommu-pci has registered a fwnode
ACPI/IORT: Add callback to update a device's fwnode
iommu/virtio: Create fwnode if necessary
iommu/virtio: Update IORT fwnode
ACPI: Add VIOT table
MAINTAINERS | 9 +
drivers/acpi/Kconfig | 7 +
drivers/acpi/Makefile | 2 +
drivers/acpi/ar...
2017 Nov 17
0
[RFC PATCH v2 4/5] ACPI/IORT: Support paravirtualized IOMMU
...OMMU ACPI IORT node
+ * @name: Base name of the device
*
* Returns: 0 on success, <0 failure
*/
-static int __init iort_add_smmu_platform_device(struct acpi_iort_node *node)
+static int __init iort_add_iommu_platform_device(struct acpi_iort_node *node,
+ const char *name)
{
struct fwnode_handle *fwnode;
struct platform_device *pdev;
@@ -1119,7 +1175,7 @@ static int __init iort_add_smmu_platform_device(struct acpi_iort_node *node)
if (!ops)
return -ENODEV;
- pdev = platform_device_alloc(ops->name, PLATFORM_DEVID_AUTO);
+ pdev = platform_device_alloc(name, PLATFORM_DEVID_...
2020 Aug 21
0
[PATCH v3 2/6] iommu/virtio: Add topology helpers
.../* PCI endpoint or range */
+ struct {
+ u16 segment;
+ u16 bdf_start;
+ u16 bdf_end;
+ };
+ /* MMIO region */
+ u64 base;
+ };
+};
+
+/* Specification of an IOMMU */
+struct virt_topo_iommu {
+ struct virt_topo_dev_id dev_id;
+ struct device *dev; /* transport device */
+ struct fwnode_handle *fwnode;
+ struct iommu_ops *ops;
+ struct list_head list;
+};
+
+/* Specification of an endpoint */
+struct virt_topo_endpoint {
+ struct virt_topo_dev_id dev_id;
+ u32 endpoint_id;
+ struct virt_topo_iommu *viommu;
+ struct list_head list;
+};
+
+void virt_topo_add_endpoint(struct...
2020 Sep 04
1
[PATCH v3 2/6] iommu/virtio: Add topology helpers
...u16 bdf_start;
> + u16 bdf_end;
> + };
> + /* MMIO region */
> + u64 base;
> + };
> +};
> +
> +/* Specification of an IOMMU */
> +struct virt_topo_iommu {
> + struct virt_topo_dev_id dev_id;
> + struct device *dev; /* transport device */
> + struct fwnode_handle *fwnode;
> + struct iommu_ops *ops;
> + struct list_head list;
> +};
> +
> +/* Specification of an endpoint */
> +struct virt_topo_endpoint {
> + struct virt_topo_dev_id dev_id;
> + u32 endpoint_id;
> + struct virt_topo_iommu *viommu;
> + struct list_hea...
2019 Nov 22
0
[RFC 00/13] virtio-iommu on non-devicetree platforms
...folder
> ACPI: Add VIOT definitions
> ACPI/IORT: Allow registration of external tables
> ACPI/IORT: Add node categories
> ACPI/IORT: Support VIOT virtio-mmio node
> ACPI/IORT: Support VIOT virtio-pci node
> ACPI/IORT: Defer probe until virtio-iommu-pci has registered a fwnode
> ACPI/IORT: Add callback to update a device's fwnode
> iommu/virtio: Create fwnode if necessary
> iommu/virtio: Update IORT fwnode
> ACPI: Add VIOT table
>
> MAINTAINERS | 9 +
> drivers/acpi/Kconfig | 7 +
> drivers/acpi/Mak...
2019 Nov 22
0
[RFC 13/13] iommu/virtio: Add topology description to
...ude <linux/kmemleak.h>
+#include <linux/virtio_iommu.h>
#include "base.h"
#include "power/power.h"
@@ -1257,6 +1258,8 @@ int platform_dma_configure(struct device *dev)
} else if (has_acpi_companion(dev)) {
attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode));
ret = acpi_dma_configure(dev, attr);
+ } else if (IS_ENABLED(CONFIG_VIRTIO_IOMMU_TOPOLOGY)) {
+ ret = virt_dma_configure(dev);
}
return ret;
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index e6eb4f238d1a..d02c0d36019d 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iomm...
2020 Apr 21
1
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...re offset within the bar */
> +};
> +
> +union viommu_topo_cfg {
> + __le16 type;
> + struct virtio_iommu_topo_pci_range pci;
> + struct virtio_iommu_topo_endpoint ep;
> +};
> +
> +struct viommu_spec {
> + struct device *dev; /* transport device */
> + struct fwnode_handle *fwnode;
> + struct iommu_ops *ops;
> + struct list_head list;
> + size_t num_items;
Intel DMAR allows an IOMMU to claim INCLUDE_ALL thus avoid listing
every endpoint one-by-one. It is especially useful when there is only
one IOMMU device in the system. Do you think wheth...
2020 Mar 01
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...re offset within the bar */
> +};
> +
> +union viommu_topo_cfg {
> + __le16 type;
> + struct virtio_iommu_topo_pci_range pci;
> + struct virtio_iommu_topo_endpoint ep;
> +};
> +
> +struct viommu_spec {
> + struct device *dev; /* transport device */
> + struct fwnode_handle *fwnode;
> + struct iommu_ops *ops;
> + struct list_head list;
> + size_t num_items;
> + /* The config array of length num_items follows */
> + union viommu_topo_cfg cfg[];
> +};
> +
> +static LIST_HEAD(viommus);
> +static DEFINE_MUTEX(viommus_lock);
&g...
2019 Nov 22
1
[RFC 13/13] iommu/virtio: Add topology description to
...#include <linux/virtio_iommu.h>
>
> #include "base.h"
> #include "power/power.h"
> @@ -1257,6 +1258,8 @@ int platform_dma_configure(struct device *dev)
> } else if (has_acpi_companion(dev)) {
> attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode));
> ret = acpi_dma_configure(dev, attr);
> + } else if (IS_ENABLED(CONFIG_VIRTIO_IOMMU_TOPOLOGY)) {
> + ret = virt_dma_configure(dev);
> }
>
> return ret;
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index e6eb4f238d1a..d02c0d36019d 100644
> -...
2018 Dec 11
13
[PATCH v6 0/7] Add virtio-iommu driver
...evice
https://www.mail-archive.com/qemu-devel at nongnu.org/msg575578.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...
2018 Dec 11
13
[PATCH v6 0/7] Add virtio-iommu driver
...evice
https://www.mail-archive.com/qemu-devel at nongnu.org/msg575578.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...re offset within the bar */
> +};
> +
> +union viommu_topo_cfg {
> + __le16 type;
> + struct virtio_iommu_topo_pci_range pci;
> + struct virtio_iommu_topo_endpoint ep;
> +};
> +
> +struct viommu_spec {
> + struct device *dev; /* transport device */
> + struct fwnode_handle *fwnode;
> + struct iommu_ops *ops;
> + struct list_head list;
> + size_t num_items;
> + /* The config array of length num_items follows */
> + union viommu_topo_cfg cfg[];
> +};
> +
> +static LIST_HEAD(viommus);
> +static DEFINE_MUTEX(viommus_lock);
&g...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...re offset within the bar */
> +};
> +
> +union viommu_topo_cfg {
> + __le16 type;
> + struct virtio_iommu_topo_pci_range pci;
> + struct virtio_iommu_topo_endpoint ep;
> +};
> +
> +struct viommu_spec {
> + struct device *dev; /* transport device */
> + struct fwnode_handle *fwnode;
> + struct iommu_ops *ops;
> + struct list_head list;
> + size_t num_items;
> + /* The config array of length num_items follows */
> + union viommu_topo_cfg cfg[];
> +};
> +
> +static LIST_HEAD(viommus);
> +static DEFINE_MUTEX(viommus_lock);
&g...
2019 May 30
10
[PATCH v8 0/7] Add virtio-iommu driver
...virtio-iommu/v0.12
git://linux-arm.org/kvmtool-jpb.git virtio-iommu/v0.12
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...
2018 Nov 22
15
[PATCH v5 0/7] Add virtio-iommu driver
...evice
https://www.mail-archive.com/qemu-devel at nongnu.org/msg575578.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...
2018 Nov 22
15
[PATCH v5 0/7] Add virtio-iommu driver
...evice
https://www.mail-archive.com/qemu-devel at nongnu.org/msg575578.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...
2018 Nov 15
12
[PATCH v4 0/7] Add virtio-iommu driver
...evice
https://www.mail-archive.com/qemu-devel at nongnu.org/msg572637.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add virtio-iommu driver
iommu/virtio: Add probe request
iommu/virtio: Add event queue
.../devicetree/bindings/virtio/iommu.txt | 66 +
.../devicetree/bindings/virtio/mmio.txt | 30 +
MAINTAINERS | 7 +
drivers/iommu/Kc...