Displaying 6 results from an estimated 6 matches for "virt_topo_iommu".
2020 Aug 21
0
[PATCH v3 2/6] iommu/virtio: Add topology helpers
...{
+ unsigned int type;
+#define VIRT_TOPO_DEV_TYPE_PCI 1
+#define VIRT_TOPO_DEV_TYPE_MMIO 2
+ union {
+ /* 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;
+...
2020 Sep 04
1
[PATCH v3 2/6] iommu/virtio: Add topology helpers
...VIRT_TOPO_DEV_TYPE_MMIO 2
> + union {
> + /* 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...
2020 Aug 21
17
[PATCH v3 0/6] Add virtio-iommu built-in topology
Add a topology description to the virtio-iommu driver and enable x86
platforms.
Since [v2] we have made some progress on adding ACPI support for
virtio-iommu, which is the preferred boot method on x86. It will be a
new vendor-agnostic table describing para-virtual topologies in a
minimal format. However some platforms don't use either ACPI or DT for
booting (for example microvm), and will
2020 Aug 21
17
[PATCH v3 0/6] Add virtio-iommu built-in topology
Add a topology description to the virtio-iommu driver and enable x86
platforms.
Since [v2] we have made some progress on adding ACPI support for
virtio-iommu, which is the preferred boot method on x86. It will be a
new vendor-agnostic table describing para-virtual topologies in a
minimal format. However some platforms don't use either ACPI or DT for
booting (for example microvm), and will
2020 Aug 21
0
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...r_free;
+ }
+ return spec;
+
+err_free:
+ kfree(spec);
+ return ERR_PTR(ret);
+}
+
+static int viommu_parse_topology(struct device *dev,
+ struct virtio_iommu_config __iomem *cfg,
+ size_t max_len)
+{
+ int ret;
+ u16 len;
+ size_t i;
+ LIST_HEAD(endpoints);
+ size_t offset, count;
+ struct virt_topo_iommu *viommu;
+ struct virt_topo_endpoint *ep, *next;
+ struct viommu_topo_header __iomem *cur;
+
+ offset = ioread16(&cfg->topo_config.offset);
+ count = ioread16(&cfg->topo_config.count);
+ if (!offset || !count)
+ return 0;
+
+ viommu = kzalloc(sizeof(*viommu), GFP_KERNEL);
+ if (!viom...
2020 Sep 04
1
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...urn ERR_PTR(ret);
> +}
> +
> +static int viommu_parse_topology(struct device *dev,
> + struct virtio_iommu_config __iomem *cfg,
> + size_t max_len)
> +{
> + int ret;
> + u16 len;
> + size_t i;
> + LIST_HEAD(endpoints);
> + size_t offset, count;
> + struct virt_topo_iommu *viommu;
> + struct virt_topo_endpoint *ep, *next;
> + struct viommu_topo_header __iomem *cur;
> +
> + offset = ioread16(&cfg->topo_config.offset);
> + count = ioread16(&cfg->topo_config.count);
> + if (!offset || !count)
> + return 0;
> +
> + viommu = kzal...