Displaying 16 results from an estimated 16 matches for "viommu_pci_parse_topolog".
Did you mean:
viommu_pci_parse_topology
2020 Sep 24
2
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...erarchy, the virtual IOMMU cannot
> manage other platform devices discovered earlier.
> +struct viommu_cap_config {
> + u8 bar;
> + u32 length; /* structure size */
> + u32 offset; /* structure offset within the bar */
s/the bar/the BAR/ (to match comment below).
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int ret;
> + u32 features;
> + void __iomem *regs, *common_regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. We...
2020 Sep 24
2
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...erarchy, the virtual IOMMU cannot
> manage other platform devices discovered earlier.
> +struct viommu_cap_config {
> + u8 bar;
> + u32 length; /* structure size */
> + u32 offset; /* structure offset within the bar */
s/the bar/the BAR/ (to match comment below).
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int ret;
> + u32 features;
> + void __iomem *regs, *common_regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. We...
2020 Aug 21
0
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...)
+{
+ u8 status;
+ ktime_t timeout = ktime_add_ms(ktime_get(), 100);
+
+ iowrite8(0, &cfg->device_status);
+ while ((status = ioread8(&cfg->device_status)) != 0 &&
+ ktime_before(ktime_get(), timeout))
+ msleep(1);
+
+ return status ? -ETIMEDOUT : 0;
+}
+
+static void viommu_pci_parse_topology(struct pci_dev *dev)
+{
+ int ret;
+ u32 features;
+ void __iomem *regs, *common_regs;
+ struct viommu_cap_config cap = {0};
+ struct virtio_pci_common_cfg __iomem *common_cfg;
+
+ /*
+ * The virtio infrastructure might not be loaded at this point. We need
+ * to access the BARs ourselves.
+ */...
2020 Sep 04
1
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...(ktime_get(), 100);
> +
> + iowrite8(0, &cfg->device_status);
> + while ((status = ioread8(&cfg->device_status)) != 0 &&
> + ktime_before(ktime_get(), timeout))
> + msleep(1);
> +
> + return status ? -ETIMEDOUT : 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int ret;
> + u32 features;
> + void __iomem *regs, *common_regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. We...
2020 Sep 25
0
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...other platform devices discovered earlier.
>
> > +struct viommu_cap_config {
> > + u8 bar;
> > + u32 length; /* structure size */
> > + u32 offset; /* structure offset within the bar */
>
> s/the bar/the BAR/ (to match comment below).
>
> > +static void viommu_pci_parse_topology(struct pci_dev *dev)
> > +{
> > + int ret;
> > + u32 features;
> > + void __iomem *regs, *common_regs;
> > + struct viommu_cap_config cap = {0};
> > + struct virtio_pci_common_cfg __iomem *common_cfg;
> > +
> > + /*
> > + * The virtio infrastr...
2020 Mar 01
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...gth);
> +
> + offset += item_length;
> + }
> + viommu_spec->num_items = num_items;
> +
> + mutex_lock(&viommus_lock);
> + list_add(&viommu_spec->list, &viommus);
> + mutex_unlock(&viommus_lock);
> +
> + return 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int pos;
> + u32 features;
> + void __iomem *regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. we need
> + *...
2019 Nov 22
0
[RFC 13/13] iommu/virtio: Add topology description to
...;Unknown topo structure 0x%x\n",
+ cap.head.type);
+ break;
+ }
+
+ offset = cap.head.next;
+ }
+
+ /* TODO: handle device removal */
+ mutex_lock(&viommus_lock);
+ list_add(&viommu_spec->list, &viommus);
+ mutex_unlock(&viommus_lock);
+
+ return 0;
+}
+
+static void viommu_pci_parse_topology(struct pci_dev *dev)
+{
+ int pos;
+ u32 features;
+ struct viommu_cap_config common = {0};
+ struct viommu_cap_config pci_cfg = {0};
+ struct viommu_cap_config dev_cfg = {0};
+
+ pos = viommu_find_capability(dev, VIRTIO_PCI_CAP_COMMON_CFG, &common);
+ if (!pos) {
+ dev_warn(&dev->dev,...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...ngth);
> +
> + offset += item_length;
> + }
> + viommu_spec->num_items = num_items;
> +
> + mutex_lock(&viommus_lock);
> + list_add(&viommu_spec->list, &viommus);
> + mutex_unlock(&viommus_lock);
> +
> + return 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int pos;
> + u32 features;
> + void __iomem *regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. we need
> + *...
2020 Mar 05
2
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...ngth);
> +
> + offset += item_length;
> + }
> + viommu_spec->num_items = num_items;
> +
> + mutex_lock(&viommus_lock);
> + list_add(&viommu_spec->list, &viommus);
> + mutex_unlock(&viommus_lock);
> +
> + return 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int pos;
> + u32 features;
> + void __iomem *regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. we need
> + *...
2020 Apr 21
1
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...ngth);
> +
> + offset += item_length;
> + }
> + viommu_spec->num_items = num_items;
> +
> + mutex_lock(&viommus_lock);
> + list_add(&viommu_spec->list, &viommus);
> + mutex_unlock(&viommus_lock);
> +
> + return 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int pos;
> + u32 features;
> + void __iomem *regs;
> + struct viommu_cap_config cap = {0};
> + struct virtio_pci_common_cfg __iomem *common_cfg;
> +
> + /*
> + * The virtio infrastructure might not be loaded at this point. we need
> + *...
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
1
[RFC 13/13] iommu/virtio: Add topology description to
...> + }
> +
> + offset = cap.head.next;
> + }
> +
> + /* TODO: handle device removal */
> + mutex_lock(&viommus_lock);
> + list_add(&viommu_spec->list, &viommus);
> + mutex_unlock(&viommus_lock);
> +
> + return 0;
> +}
> +
> +static void viommu_pci_parse_topology(struct pci_dev *dev)
> +{
> + int pos;
> + u32 features;
> + struct viommu_cap_config common = {0};
> + struct viommu_cap_config pci_cfg = {0};
> + struct viommu_cap_config dev_cfg = {0};
> +
> + pos = viommu_find_capability(dev, VIRTIO_PCI_CAP_COMMON_CFG, &common);
>...
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
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.