search for: topo_config

Displaying 11 results from an estimated 11 matches for "topo_config".

2020 Mar 01
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...ct virtio_iommu_config __iomem *cfg) why is this int? always succeeds and callers don't use the return code ... > +{ > + size_t i; > + size_t spec_length; > + struct viommu_spec *viommu_spec; > + u32 offset, item_length, num_items; > + > + offset = ioread32(&cfg->topo_config.offset); > + item_length = ioread32(&cfg->topo_config.item_length); > + num_items = ioread32(&cfg->topo_config.num_items); > + if (!offset || !num_items || !item_length) > + return 0; > + > + spec_length = sizeof(*viommu_spec) + num_items * > + sizeof(un...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...} > + > +static int viommu_parse_topology(struct device *dev, > + struct virtio_iommu_config __iomem *cfg) > +{ > + size_t i; > + size_t spec_length; > + struct viommu_spec *viommu_spec; > + u32 offset, item_length, num_items; > + > + offset = ioread32(&cfg->topo_config.offset); > + item_length = ioread32(&cfg->topo_config.item_length); > + num_items = ioread32(&cfg->topo_config.num_items); > + if (!offset || !num_items || !item_length) > + return 0; > + > + spec_length = sizeof(*viommu_spec) + num_items * > + sizeof(un...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...} > + > +static int viommu_parse_topology(struct device *dev, > + struct virtio_iommu_config __iomem *cfg) > +{ > + size_t i; > + size_t spec_length; > + struct viommu_spec *viommu_spec; > + u32 offset, item_length, num_items; > + > + offset = ioread32(&cfg->topo_config.offset); > + item_length = ioread32(&cfg->topo_config.item_length); > + num_items = ioread32(&cfg->topo_config.num_items); > + if (!offset || !num_items || !item_length) > + return 0; > + > + spec_length = sizeof(*viommu_spec) + num_items * > + sizeof(un...
2020 Apr 21
1
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...} > + > +static int viommu_parse_topology(struct device *dev, > + struct virtio_iommu_config __iomem *cfg) > +{ > + size_t i; > + size_t spec_length; > + struct viommu_spec *viommu_spec; > + u32 offset, item_length, num_items; > + > + offset = ioread32(&cfg->topo_config.offset); > + item_length = ioread32(&cfg->topo_config.item_length); > + num_items = ioread32(&cfg->topo_config.num_items); > + if (!offset || !num_items || !item_length) > + return 0; > + > + spec_length = sizeof(*viommu_spec) + num_items * > + sizeof(un...
2020 Feb 14
5
[PATCH 0/3] virtio-iommu on non-devicetree platforms
Add topology description to the virtio-iommu driver and enable x86 platforms. Since the RFC [1] I've mostly given up on ACPI tables, since the internal discussions seem to have reached a dead end. The built-in topology description presented here isn't ideal, but it is simple to implement and doesn't impose a dependency on ACPI or device-tree, which can be beneficial to lightweight
2020 Aug 21
0
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...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 (!viommu) + return -ENOMEM; + + viommu->dev = dev; + + for (i = 0; i < count; i++, offset += len) { + if (offset + sizeof(*cur) > max...
2020 Sep 04
1
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...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 (!viommu) > + return -ENOMEM; > + > + viommu->dev = dev; > + > + for (i = 0; i < count; i++,...
2020 Apr 13
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...efine VIRTIO_IOMMU_F_PROBE 4 > #define VIRTIO_IOMMU_F_MMIO 5 > +#define VIRTIO_IOMMU_F_TOPOLOGY 6 > > struct virtio_iommu_range_64 { > __le64 start; > @@ -27,6 +28,12 @@ struct virtio_iommu_range_32 { > __le32 end; > }; > > +struct virtio_iommu_topo_config { > + __le32 offset; Any restrictions on offset? E.g. alignment? > + __le32 num_items; > + __le32 item_length; > +}; > + > struct virtio_iommu_config { > /* Supported page sizes */ > __le64 page_size_mask; > @@ -36,6 +43,25 @@ struct virtio_iommu_co...
2020 Aug 21
0
[PATCH v3 4/6] iommu/virtio: Add topology definitions
...,6 +16,7 @@ #define VIRTIO_IOMMU_F_BYPASS 3 #define VIRTIO_IOMMU_F_PROBE 4 #define VIRTIO_IOMMU_F_MMIO 5 +#define VIRTIO_IOMMU_F_TOPOLOGY 6 struct virtio_iommu_range_64 { __le64 start; @@ -27,6 +28,17 @@ struct virtio_iommu_range_32 { __le32 end; }; +struct virtio_iommu_topo_config { + /* Number of topology description structures */ + __le16 count; + /* + * Offset to the first topology description structure + * (virtio_iommu_topo_*) from the start of the virtio_iommu config + * space. Aligned on 8 bytes. + */ + __le16 offset; +}; + struct virtio_iommu_config {...
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