Displaying 18 results from an estimated 18 matches for "virtio_iommu_f_topolog".
Did you mean:
virtio_iommu_f_topology
2019 Nov 22
0
[RFC virtio 12/13] virtio-iommu: Add built-in topology description
...tio-iommu.tex b/virtio-iommu.tex
index 28c562b..2b29873 100644
--- a/virtio-iommu.tex
+++ b/virtio-iommu.tex
@@ -67,6 +67,9 @@ \subsection{Feature bits}\label{sec:Device Types / IOMMU Device / Feature bits}
\item[VIRTIO_IOMMU_F_MMIO (5)]
The VIRTIO_IOMMU_MAP_F_MMIO flag is available.
+
+\item[VIRTIO_IOMMU_F_TOPOLOGY (6)]
+ Topology description is available at \field{topo_offset}.
\end{description}
\drivernormative{\subsubsection}{Feature bits}{Device Types / IOMMU Device / Feature bits}
@@ -97,6 +100,7 @@ \subsection{Device configuration layout}\label{sec:Device Types / IOMMU Device /
le32 end;
}...
2020 Aug 21
0
[PATCH v3 4/6] iommu/virtio: Add topology definitions
Add struct definitions for describing endpoints managed by the
virtio-iommu. When VIRTIO_IOMMU_F_TOPOLOGY is offered, an array of
virtio_iommu_topo_* structures in config space describes the endpoints,
identified either by their PCI BDF or their physical MMIO address.
Signed-off-by: Jean-Philippe Brucker <jean-philippe at linaro.org>
---
include/uapi/linux/virtio_iommu.h | 44 +++++++++++++++++...
2020 Apr 13
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...io_iommu.h
> index 237e36a280cb..ec57d215086a 100644
> --- a/include/uapi/linux/virtio_iommu.h
> +++ b/include/uapi/linux/virtio_iommu.h
> @@ -16,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,12 @@ struct virtio_iommu_range_32 {
> __le32 end;
> };
>
> +struct virtio_iommu_topo_config {
> + __le32 offset;
Any restrictions on offset? E.g. alignment?
> + __le32 n...
2020 Mar 01
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...s let's reset at the end?
> + /* Find out if the device supports topology description */
> + writel(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + pci_iounmap(dev, regs);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + return;
> + }
> +
> + pos = viommu_pci_find_capability(dev, VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!pos) {
> + pci_warn(dev, "device config capability not found\n");
> +...
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
2019 Nov 22
0
[RFC 13/13] iommu/virtio: Add topology description to
...gy description */
+ viommu_cwrite(dev, pos, &common, 4,
+ offsetof(struct virtio_pci_common_cfg,
+ device_feature_select),
+ 0);
+ features = viommu_cread(dev, pos, &common, 4,
+ offsetof(struct virtio_pci_common_cfg,
+ device_feature));
+ if (!(features & VIRTIO_IOMMU_F_TOPOLOGY)) {
+ dev_dbg(&dev->dev, "device doesn't have topology description");
+ return;
+ }
+
+ viommu_parse_topology(dev, pos, &dev_cfg);
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_REDHAT_QUMRANET, 0x1014,
+ viommu_pci_parse_topology);
+
+static const struct iommu_ops *virt_...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...cfg = regs + cap.offset;
> +
> + /* Find out if the device supports topology description */
> + writel(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + pci_iounmap(dev, regs);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + return;
> + }
> +
> + pos = viommu_pci_find_capability(dev,
> VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!pos) {
> + pci_warn(dev, "device config capability not found\n");
&...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...cfg = regs + cap.offset;
> +
> + /* Find out if the device supports topology description */
> + writel(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + pci_iounmap(dev, regs);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + return;
> + }
> +
> + pos = viommu_pci_find_capability(dev,
> VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!pos) {
> + pci_warn(dev, "device config capability not found\n");
&...
2020 Apr 21
1
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...cfg = regs + cap.offset;
> +
> + /* Find out if the device supports topology description */
> + writel(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + pci_iounmap(dev, regs);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + return;
> + }
> +
> + pos = viommu_pci_find_capability(dev,
> VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!pos) {
> + pci_warn(dev, "device config capability not found\n");
&...
2020 Sep 24
2
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...NFIG_S_DRIVER,
> + &common_cfg->device_status);
> +
> + /* Find out if the device supports topology description */
> + iowrite32(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + goto out_reset;
> + }
> +
> + ret = viommu_pci_find_capability(dev, VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!ret) {
> + pci_warn(dev, "device config capability not found\n")...
2020 Sep 24
2
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...NFIG_S_DRIVER,
> + &common_cfg->device_status);
> +
> + /* Find out if the device supports topology description */
> + iowrite32(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + goto out_reset;
> + }
> +
> + ret = viommu_pci_find_capability(dev, VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!ret) {
> + pci_warn(dev, "device config capability not found\n")...
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the
moment only devicetree (DT) is supported and we don't have a pleasant
solution for other platforms. Once we figure out the topology
description, x86 support is trivial.
Since the IOMMU manages memory accesses from other devices, the guest
kernel needs to initialize the IOMMU before endpoints start issuing DMA.
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the
moment only devicetree (DT) is supported and we don't have a pleasant
solution for other platforms. Once we figure out the topology
description, x86 support is trivial.
Since the IOMMU manages memory accesses from other devices, the guest
kernel needs to initialize the IOMMU before endpoints start issuing DMA.
2019 Nov 22
1
[RFC 13/13] iommu/virtio: Add topology description to
...ev, pos, &common, 4,
> + offsetof(struct virtio_pci_common_cfg,
> + device_feature_select),
> + 0);
> + features = viommu_cread(dev, pos, &common, 4,
> + offsetof(struct virtio_pci_common_cfg,
> + device_feature));
> + if (!(features & VIRTIO_IOMMU_F_TOPOLOGY)) {
> + dev_dbg(&dev->dev, "device doesn't have topology description");
> + return;
> + }
> +
> + viommu_parse_topology(dev, pos, &dev_cfg);
> +}
> +
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_REDHAT_QUMRANET, 0x1014,
> + viommu_pci_parse_topol...
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
...IO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER,
+ &common_cfg->device_status);
+
+ /* Find out if the device supports topology description */
+ iowrite32(0, &common_cfg->device_feature_select);
+ features = ioread32(&common_cfg->device_feature);
+
+ if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
+ pci_dbg(dev, "device doesn't have topology description");
+ goto out_reset;
+ }
+
+ ret = viommu_pci_find_capability(dev, VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
+ if (!ret) {
+ pci_warn(dev, "device config capability not found\n");
+ goto out_reset;
+ }
+
+ regs =...
2020 Sep 04
1
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...NFIG_S_DRIVER,
> + &common_cfg->device_status);
> +
> + /* Find out if the device supports topology description */
> + iowrite32(0, &common_cfg->device_feature_select);
> + features = ioread32(&common_cfg->device_feature);
> +
> + if (!(features & BIT(VIRTIO_IOMMU_F_TOPOLOGY))) {
> + pci_dbg(dev, "device doesn't have topology description");
> + goto out_reset;
> + }
> +
> + ret = viommu_pci_find_capability(dev, VIRTIO_PCI_CAP_DEVICE_CFG, &cap);
> + if (!ret) {
> + pci_warn(dev, "device config capability not found\n")...