From: Jean-Philippe Brucker <jean-philippe@linaro.org> To: iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org Cc: joro@8bytes.org, bhelgaas@google.com, mst@redhat.com, jasowang@redhat.com, kevin.tian@intel.com, sebastien.boeuf@intel.com, eric.auger@redhat.com, jacob.jun.pan@intel.com, robin.murphy@arm.com, Jean-Philippe Brucker <jean-philippe@linaro.org> Subject: [PATCH v2 0/3] virtio-iommu on x86 and non-devicetree platforms Date: Fri, 28 Feb 2020 18:25:35 +0100 [thread overview] Message-ID: <20200228172537.377327-1-jean-philippe@linaro.org> (raw) Add a topology description to the virtio-iommu driver and enable x86 platforms. Two minor changes since v1 [1]: * Don't setup DMA twice in patch 1 * Clarify the CONFIG_IOMMU_DMA selection in patch 3 And rebased on top of "iommu/virtio: Build virtio-iommu as a module" which Joerg picked up for v5.7. --- Copy-paste from v1: The built-in description is an array in the virtio config space. The driver parses the config space early and postpones endpoint probe until the virtio-iommu device is ready. Each element in the array describes either a PCI range or a single MMIO endpoint, and their associated endpoint IDs: struct virtio_iommu_topo_pci_range { __le16 type; /* 1: PCI range */ __le16 hierarchy; /* PCI domain number */ __le16 requester_start; /* First BDF */ __le16 requester_end; /* Last BDF */ __le32 endpoint_start; /* First endpoint ID */ }; struct virtio_iommu_topo_endpoint { __le16 type; /* 2: Endpoint */ __le16 reserved; /* 0 */ __le32 endpoint; /* Endpoint ID */ __le64 address; /* First MMIO address */ }; You can find the QEMU patches based on Eric's latest device on my virtio-iommu/devel branch [2]. I test on both x86 q35, and aarch64 virt machine with edk2. --- [1] https://lore.kernel.org/linux-iommu/20200214160413.1475396-1-jean-philippe@linaro.org/ [2] https://jpbrucker.net/git/qemu virtio-iommu/devel Jean-Philippe Brucker (3): iommu/virtio: Add topology description to virtio-iommu config space PCI: Add DMA configuration for virtual platforms iommu/virtio: Enable x86 support MAINTAINERS | 2 + drivers/iommu/Kconfig | 13 +- drivers/iommu/Makefile | 1 + drivers/iommu/virtio-iommu-topology.c | 343 ++++++++++++++++++++++++++ drivers/iommu/virtio-iommu.c | 3 + drivers/pci/pci-driver.c | 5 + include/linux/virt_iommu.h | 19 ++ include/uapi/linux/virtio_iommu.h | 26 ++ 8 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 drivers/iommu/virtio-iommu-topology.c create mode 100644 include/linux/virt_iommu.h -- 2.25.0
WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org> To: iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>, kevin.tian@intel.com, mst@redhat.com, sebastien.boeuf@intel.com, jacob.jun.pan@intel.com, bhelgaas@google.com, robin.murphy@arm.com, jasowang@redhat.com Subject: [PATCH v2 0/3] virtio-iommu on x86 and non-devicetree platforms Date: Fri, 28 Feb 2020 18:25:35 +0100 [thread overview] Message-ID: <20200228172537.377327-1-jean-philippe@linaro.org> (raw) Add a topology description to the virtio-iommu driver and enable x86 platforms. Two minor changes since v1 [1]: * Don't setup DMA twice in patch 1 * Clarify the CONFIG_IOMMU_DMA selection in patch 3 And rebased on top of "iommu/virtio: Build virtio-iommu as a module" which Joerg picked up for v5.7. --- Copy-paste from v1: The built-in description is an array in the virtio config space. The driver parses the config space early and postpones endpoint probe until the virtio-iommu device is ready. Each element in the array describes either a PCI range or a single MMIO endpoint, and their associated endpoint IDs: struct virtio_iommu_topo_pci_range { __le16 type; /* 1: PCI range */ __le16 hierarchy; /* PCI domain number */ __le16 requester_start; /* First BDF */ __le16 requester_end; /* Last BDF */ __le32 endpoint_start; /* First endpoint ID */ }; struct virtio_iommu_topo_endpoint { __le16 type; /* 2: Endpoint */ __le16 reserved; /* 0 */ __le32 endpoint; /* Endpoint ID */ __le64 address; /* First MMIO address */ }; You can find the QEMU patches based on Eric's latest device on my virtio-iommu/devel branch [2]. I test on both x86 q35, and aarch64 virt machine with edk2. --- [1] https://lore.kernel.org/linux-iommu/20200214160413.1475396-1-jean-philippe@linaro.org/ [2] https://jpbrucker.net/git/qemu virtio-iommu/devel Jean-Philippe Brucker (3): iommu/virtio: Add topology description to virtio-iommu config space PCI: Add DMA configuration for virtual platforms iommu/virtio: Enable x86 support MAINTAINERS | 2 + drivers/iommu/Kconfig | 13 +- drivers/iommu/Makefile | 1 + drivers/iommu/virtio-iommu-topology.c | 343 ++++++++++++++++++++++++++ drivers/iommu/virtio-iommu.c | 3 + drivers/pci/pci-driver.c | 5 + include/linux/virt_iommu.h | 19 ++ include/uapi/linux/virtio_iommu.h | 26 ++ 8 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 drivers/iommu/virtio-iommu-topology.c create mode 100644 include/linux/virt_iommu.h -- 2.25.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next reply other threads:[~2020-02-28 17:28 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-28 17:25 Jean-Philippe Brucker [this message] 2020-02-28 17:25 ` [PATCH v2 0/3] virtio-iommu on x86 and non-devicetree platforms Jean-Philippe Brucker 2020-02-28 17:25 ` [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space Jean-Philippe Brucker 2020-02-28 17:25 ` Jean-Philippe Brucker 2020-03-01 11:17 ` Michael S. Tsirkin 2020-03-01 11:17 ` Michael S. Tsirkin 2020-03-02 16:16 ` Joerg Roedel 2020-03-02 16:16 ` Joerg Roedel 2020-03-03 10:19 ` Auger Eric 2020-03-03 10:19 ` Auger Eric 2020-03-03 13:01 ` Joerg Roedel 2020-03-03 13:01 ` Joerg Roedel 2020-03-03 14:00 ` Michael S. Tsirkin 2020-03-03 14:00 ` Michael S. Tsirkin 2020-03-03 15:53 ` Joerg Roedel 2020-03-03 15:53 ` Joerg Roedel 2020-03-03 16:09 ` Michael S. Tsirkin 2020-03-03 16:09 ` Michael S. Tsirkin 2020-03-03 16:21 ` Auger Eric 2020-03-03 16:21 ` Auger Eric 2020-03-04 13:37 ` Joerg Roedel 2020-03-04 13:37 ` Joerg Roedel 2020-03-04 15:38 ` Jean-Philippe Brucker 2020-03-04 15:38 ` Jean-Philippe Brucker 2020-03-04 17:40 ` Joerg Roedel 2020-03-04 17:40 ` Joerg Roedel 2020-03-04 21:37 ` Jacob Pan (Jun) 2020-03-04 21:37 ` Jacob Pan (Jun) 2020-03-04 21:37 ` Jacob Pan (Jun) 2020-03-04 21:54 ` Joerg Roedel 2020-03-04 21:54 ` Joerg Roedel 2020-03-05 15:42 ` Michael S. Tsirkin 2020-03-05 15:42 ` Michael S. Tsirkin 2020-03-04 15:48 ` Jacob Pan 2020-03-04 15:48 ` Jacob Pan 2020-03-04 17:34 ` Joerg Roedel 2020-03-04 17:34 ` Joerg Roedel 2020-03-04 19:34 ` Michael S. Tsirkin 2020-03-04 19:34 ` Michael S. Tsirkin 2020-03-04 21:50 ` Joerg Roedel 2020-03-04 21:50 ` Joerg Roedel 2020-03-05 15:39 ` Michael S. Tsirkin 2020-03-05 15:39 ` Michael S. Tsirkin 2020-03-03 14:02 ` Michael S. Tsirkin 2020-03-03 14:02 ` Michael S. Tsirkin 2020-03-03 14:02 ` Michael S. Tsirkin 2020-03-05 8:07 ` Tian, Kevin 2020-03-05 8:07 ` Tian, Kevin 2020-03-05 8:07 ` Tian, Kevin 2020-03-11 17:48 ` Jean-Philippe Brucker 2020-03-11 17:48 ` Jean-Philippe Brucker 2020-03-11 17:48 ` Jean-Philippe Brucker 2020-03-11 21:48 ` Michael S. Tsirkin 2020-03-11 21:48 ` Michael S. Tsirkin 2020-03-11 21:48 ` Michael S. Tsirkin 2020-04-13 13:22 ` Michael S. Tsirkin 2020-04-13 13:22 ` Michael S. Tsirkin 2020-04-21 7:31 ` Tian, Kevin 2020-04-21 7:31 ` Tian, Kevin 2020-04-21 7:31 ` Tian, Kevin 2020-08-21 8:39 ` Jean-Philippe Brucker 2020-08-21 8:39 ` Jean-Philippe Brucker 2020-08-21 8:39 ` Jean-Philippe Brucker 2020-02-28 17:25 ` [PATCH v2 2/3] PCI: Add DMA configuration for virtual platforms Jean-Philippe Brucker 2020-02-28 17:25 ` Jean-Philippe Brucker 2020-03-18 21:10 ` Bjorn Helgaas 2020-03-18 21:10 ` Bjorn Helgaas 2020-02-28 17:25 ` [PATCH v2 3/3] iommu/virtio: Enable x86 support Jean-Philippe Brucker 2020-02-28 17:25 ` Jean-Philippe Brucker 2020-02-29 14:23 ` kbuild test robot 2020-02-29 14:23 ` kbuild test robot 2020-02-29 14:23 ` kbuild test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200228172537.377327-1-jean-philippe@linaro.org \ --to=jean-philippe@linaro.org \ --cc=bhelgaas@google.com \ --cc=eric.auger@redhat.com \ --cc=iommu@lists.linux-foundation.org \ --cc=jacob.jun.pan@intel.com \ --cc=jasowang@redhat.com \ --cc=joro@8bytes.org \ --cc=kevin.tian@intel.com \ --cc=linux-pci@vger.kernel.org \ --cc=mst@redhat.com \ --cc=robin.murphy@arm.com \ --cc=sebastien.boeuf@intel.com \ --cc=virtualization@lists.linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.