All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	gabriele.paoloni-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
	catalin.marinas-5wv7dgnIgG8@public.gmane.org,
	will.deacon-5wv7dgnIgG8@public.gmane.org,
	okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
	lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org,
	sudeep.holla-5wv7dgnIgG8@public.gmane.org
Subject: [RFCv2 PATCH 21/36] iommu/arm-smmu-v3: Implement process operations
Date: Fri,  6 Oct 2017 14:31:48 +0100	[thread overview]
Message-ID: <20171006133203.22803-22-jean-philippe.brucker@arm.com> (raw)
In-Reply-To: <20171006133203.22803-1-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>

Hook process operations to support PASID and page table sharing with the
SMMUv3:

* process_allocate pins down its ASID and initializes the context
  descriptor fields.
* process_free releases the ASID.
* process_attach checks device capabilities and writes the context
  descriptor. More work is required to ensure that the process' ASID isn't
  being used for io-pgtables.
* process_detach clears the context descriptor and sends required
  invalidations.
* process_invalidate sends required invalidations.
* process_exit stops us of the PASID, clears the context descriptor and
  performs required invalidations.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
---
 drivers/iommu/arm-smmu-v3.c | 207 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)

diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 71fc3a2c8a95..c86a1182c137 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/iommu.h>
 #include <linux/iopoll.h>
+#include <linux/mmu_context.h>
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of.h>
@@ -37,6 +38,7 @@
 #include <linux/of_platform.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/sched/mm.h>
 
 #include <linux/amba/bus.h>
 
@@ -642,6 +644,7 @@ struct arm_smmu_strtab_cfg {
 
 struct arm_smmu_asid_state {
 	struct arm_smmu_domain		*domain;
+	unsigned long			refs;
 };
 
 /* An SMMUv3 instance */
@@ -712,6 +715,9 @@ struct arm_smmu_master_data {
 	struct device			*dev;
 
 	size_t				num_ssids;
+	bool				can_fault;
+	/* Number of processes attached */
+	int				processes;
 };
 
 /* SMMU private data for an IOMMU domain */
@@ -740,6 +746,11 @@ struct arm_smmu_domain {
 	spinlock_t			devices_lock;
 };
 
+struct arm_smmu_process {
+	struct iommu_process		process;
+	struct arm_smmu_ctx_desc	ctx_desc;
+};
+
 struct arm_smmu_option_prop {
 	u32 opt;
 	const char *prop;
@@ -766,6 +777,11 @@ static struct arm_smmu_domain *to_smmu_domain(struct iommu_domain *dom)
 	return container_of(dom, struct arm_smmu_domain, domain);
 }
 
+static struct arm_smmu_process *to_smmu_process(struct iommu_process *process)
+{
+	return container_of(process, struct arm_smmu_process, process);
+}
+
 static void parse_driver_options(struct arm_smmu_device *smmu)
 {
 	int i = 0;
@@ -2032,6 +2048,13 @@ static void arm_smmu_detach_dev(struct device *dev)
 	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
 	struct arm_smmu_domain *smmu_domain = master->domain;
 
+	/*
+	 * Core is preventing concurrent calls between attach and bind, so this
+	 * read only races with process_exit (FIXME).
+	 */
+	if (master->processes)
+		__iommu_process_unbind_dev_all(&smmu_domain->domain, dev);
+
 	if (smmu_domain) {
 		spin_lock_irqsave(&smmu_domain->devices_lock, flags);
 		list_del(&master->list);
@@ -2143,6 +2166,184 @@ arm_smmu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova)
 	return ops->iova_to_phys(ops, iova);
 }
 
+static int arm_smmu_process_init_pgtable(struct arm_smmu_process *smmu_process,
+					 struct mm_struct *mm)
+{
+	int asid;
+
+	asid = mm_context_get(mm);
+	if (!asid)
+		return -ENOSPC;
+
+	smmu_process->ctx_desc.asid = asid;
+	/* TODO: init the rest */
+
+	return 0;
+}
+
+static struct iommu_process *arm_smmu_process_alloc(struct task_struct *task)
+{
+	int ret;
+	struct mm_struct *mm;
+	struct arm_smmu_process *smmu_process;
+
+	smmu_process = kzalloc(sizeof(*smmu_process), GFP_KERNEL);
+
+	mm = get_task_mm(task);
+	if (!mm) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	ret = arm_smmu_process_init_pgtable(smmu_process, mm);
+	mmput(mm);
+	if (ret) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	return &smmu_process->process;
+}
+
+static void arm_smmu_process_free(struct iommu_process *process)
+{
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+
+	/* Unpin ASID */
+	mm_context_put(process->mm);
+
+	kfree(smmu_process);
+}
+
+static int arm_smmu_process_share(struct arm_smmu_domain *smmu_domain,
+				  struct arm_smmu_process *smmu_process)
+{
+	int asid, ret;
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	asid = smmu_process->ctx_desc.asid;
+
+	asid_state = idr_find(&smmu->asid_idr, asid);
+	if (asid_state && asid_state->domain) {
+		return -EEXIST;
+	} else if (asid_state) {
+		asid_state->refs++;
+		return 0;
+	}
+
+	asid_state = kzalloc(sizeof(*asid_state), GFP_ATOMIC);
+	asid_state->refs = 1;
+
+	if (!asid_state)
+		return -ENOMEM;
+
+	ret = idr_alloc(&smmu->asid_idr, asid_state, asid, asid + 1, GFP_ATOMIC);
+	return ret < 0 ? ret : 0;
+}
+
+static int arm_smmu_process_attach(struct iommu_domain *domain,
+				   struct device *dev,
+				   struct iommu_process *process, bool first)
+{
+	int ret;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+
+	if (!(smmu->features & ARM_SMMU_FEAT_SVM))
+		return -ENODEV;
+
+	/* TODO: process->no_pasid */
+	if (process->pasid >= master->num_ssids)
+		return -ENODEV;
+
+	/* TODO: process->no_need_for_pri_ill_pin_everything */
+	if (!master->can_fault)
+		return -ENODEV;
+
+	master->processes++;
+
+	if (!first)
+		return 0;
+
+	spin_lock(&smmu->asid_lock);
+	ret = arm_smmu_process_share(smmu_domain, smmu_process);
+	spin_unlock(&smmu->asid_lock);
+	if (ret)
+		return ret;
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, &smmu_process->ctx_desc);
+
+	return 0;
+}
+
+static void arm_smmu_process_detach(struct iommu_domain *domain,
+				    struct device *dev,
+				    struct iommu_process *process, bool last)
+{
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	master->processes--;
+
+	if (last) {
+		spin_lock(&smmu->asid_lock);
+		asid_state = idr_find(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+		if (--asid_state->refs == 0) {
+			idr_remove(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+			kfree(asid_state);
+		}
+		spin_unlock(&smmu->asid_lock);
+
+		arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+	}
+
+	/* TODO: Invalidate ATC. */
+	/* TODO: Invalidate all mappings if last and not DVM. */
+}
+
+static void arm_smmu_process_invalidate(struct iommu_domain *domain,
+					struct iommu_process *process,
+					unsigned long iova, size_t size)
+{
+	/*
+	 * TODO: Invalidate ATC.
+	 * TODO: Invalidate mapping if not DVM
+	 */
+}
+
+static void arm_smmu_process_exit(struct iommu_domain *domain,
+				  struct iommu_process *process)
+{
+	struct arm_smmu_master_data *master;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+
+	if (!domain->process_exit)
+		return;
+
+	spin_lock(&smmu_domain->devices_lock);
+	list_for_each_entry(master, &smmu_domain->devices, list) {
+		if (!master->processes)
+			continue;
+
+		master->processes--;
+		domain->process_exit(domain, master->dev, process->pasid,
+				     domain->process_exit_token);
+
+		/* TODO: inval ATC */
+	}
+	spin_unlock(&smmu_domain->devices_lock);
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+
+	/* TODO: Invalidate all mappings if not DVM */
+}
+
 static struct platform_driver arm_smmu_driver;
 
 static int arm_smmu_match_node(struct device *dev, void *data)
@@ -2351,6 +2552,12 @@ static struct iommu_ops arm_smmu_ops = {
 	.domain_alloc		= arm_smmu_domain_alloc,
 	.domain_free		= arm_smmu_domain_free,
 	.attach_dev		= arm_smmu_attach_dev,
+	.process_alloc		= arm_smmu_process_alloc,
+	.process_free		= arm_smmu_process_free,
+	.process_attach		= arm_smmu_process_attach,
+	.process_detach		= arm_smmu_process_detach,
+	.process_invalidate	= arm_smmu_process_invalidate,
+	.process_exit		= arm_smmu_process_exit,
 	.map			= arm_smmu_map,
 	.unmap			= arm_smmu_unmap,
 	.map_sg			= default_iommu_map_sg,
-- 
2.13.3

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
To: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
	linux-acpi@vger.kernel.org, devicetree@vger.kernel.org,
	iommu@lists.linux-foundation.org
Cc: joro@8bytes.org, robh+dt@kernel.org, mark.rutland@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com,
	lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org,
	sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org,
	robin.murphy@arm.com, bhelgaas@google.com,
	alex.williamson@redhat.com, tn@semihalf.com, liubo95@huawei.com,
	thunder.leizhen@huawei.com, xieyisheng1@huawei.com,
	gabriele.paoloni@huawei.com, nwatters@codeaurora.org,
	okaya@codeaurora.org, rfranz@cavium.com, dwmw2@infradead.org,
	jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com,
	ashok.raj@intel.com, robdclark@gmail.com
Subject: [RFCv2 PATCH 21/36] iommu/arm-smmu-v3: Implement process operations
Date: Fri,  6 Oct 2017 14:31:48 +0100	[thread overview]
Message-ID: <20171006133203.22803-22-jean-philippe.brucker@arm.com> (raw)
In-Reply-To: <20171006133203.22803-1-jean-philippe.brucker@arm.com>

Hook process operations to support PASID and page table sharing with the
SMMUv3:

* process_allocate pins down its ASID and initializes the context
  descriptor fields.
* process_free releases the ASID.
* process_attach checks device capabilities and writes the context
  descriptor. More work is required to ensure that the process' ASID isn't
  being used for io-pgtables.
* process_detach clears the context descriptor and sends required
  invalidations.
* process_invalidate sends required invalidations.
* process_exit stops us of the PASID, clears the context descriptor and
  performs required invalidations.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
---
 drivers/iommu/arm-smmu-v3.c | 207 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)

diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 71fc3a2c8a95..c86a1182c137 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/iommu.h>
 #include <linux/iopoll.h>
+#include <linux/mmu_context.h>
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of.h>
@@ -37,6 +38,7 @@
 #include <linux/of_platform.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/sched/mm.h>
 
 #include <linux/amba/bus.h>
 
@@ -642,6 +644,7 @@ struct arm_smmu_strtab_cfg {
 
 struct arm_smmu_asid_state {
 	struct arm_smmu_domain		*domain;
+	unsigned long			refs;
 };
 
 /* An SMMUv3 instance */
@@ -712,6 +715,9 @@ struct arm_smmu_master_data {
 	struct device			*dev;
 
 	size_t				num_ssids;
+	bool				can_fault;
+	/* Number of processes attached */
+	int				processes;
 };
 
 /* SMMU private data for an IOMMU domain */
@@ -740,6 +746,11 @@ struct arm_smmu_domain {
 	spinlock_t			devices_lock;
 };
 
+struct arm_smmu_process {
+	struct iommu_process		process;
+	struct arm_smmu_ctx_desc	ctx_desc;
+};
+
 struct arm_smmu_option_prop {
 	u32 opt;
 	const char *prop;
@@ -766,6 +777,11 @@ static struct arm_smmu_domain *to_smmu_domain(struct iommu_domain *dom)
 	return container_of(dom, struct arm_smmu_domain, domain);
 }
 
+static struct arm_smmu_process *to_smmu_process(struct iommu_process *process)
+{
+	return container_of(process, struct arm_smmu_process, process);
+}
+
 static void parse_driver_options(struct arm_smmu_device *smmu)
 {
 	int i = 0;
@@ -2032,6 +2048,13 @@ static void arm_smmu_detach_dev(struct device *dev)
 	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
 	struct arm_smmu_domain *smmu_domain = master->domain;
 
+	/*
+	 * Core is preventing concurrent calls between attach and bind, so this
+	 * read only races with process_exit (FIXME).
+	 */
+	if (master->processes)
+		__iommu_process_unbind_dev_all(&smmu_domain->domain, dev);
+
 	if (smmu_domain) {
 		spin_lock_irqsave(&smmu_domain->devices_lock, flags);
 		list_del(&master->list);
@@ -2143,6 +2166,184 @@ arm_smmu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova)
 	return ops->iova_to_phys(ops, iova);
 }
 
+static int arm_smmu_process_init_pgtable(struct arm_smmu_process *smmu_process,
+					 struct mm_struct *mm)
+{
+	int asid;
+
+	asid = mm_context_get(mm);
+	if (!asid)
+		return -ENOSPC;
+
+	smmu_process->ctx_desc.asid = asid;
+	/* TODO: init the rest */
+
+	return 0;
+}
+
+static struct iommu_process *arm_smmu_process_alloc(struct task_struct *task)
+{
+	int ret;
+	struct mm_struct *mm;
+	struct arm_smmu_process *smmu_process;
+
+	smmu_process = kzalloc(sizeof(*smmu_process), GFP_KERNEL);
+
+	mm = get_task_mm(task);
+	if (!mm) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	ret = arm_smmu_process_init_pgtable(smmu_process, mm);
+	mmput(mm);
+	if (ret) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	return &smmu_process->process;
+}
+
+static void arm_smmu_process_free(struct iommu_process *process)
+{
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+
+	/* Unpin ASID */
+	mm_context_put(process->mm);
+
+	kfree(smmu_process);
+}
+
+static int arm_smmu_process_share(struct arm_smmu_domain *smmu_domain,
+				  struct arm_smmu_process *smmu_process)
+{
+	int asid, ret;
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	asid = smmu_process->ctx_desc.asid;
+
+	asid_state = idr_find(&smmu->asid_idr, asid);
+	if (asid_state && asid_state->domain) {
+		return -EEXIST;
+	} else if (asid_state) {
+		asid_state->refs++;
+		return 0;
+	}
+
+	asid_state = kzalloc(sizeof(*asid_state), GFP_ATOMIC);
+	asid_state->refs = 1;
+
+	if (!asid_state)
+		return -ENOMEM;
+
+	ret = idr_alloc(&smmu->asid_idr, asid_state, asid, asid + 1, GFP_ATOMIC);
+	return ret < 0 ? ret : 0;
+}
+
+static int arm_smmu_process_attach(struct iommu_domain *domain,
+				   struct device *dev,
+				   struct iommu_process *process, bool first)
+{
+	int ret;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+
+	if (!(smmu->features & ARM_SMMU_FEAT_SVM))
+		return -ENODEV;
+
+	/* TODO: process->no_pasid */
+	if (process->pasid >= master->num_ssids)
+		return -ENODEV;
+
+	/* TODO: process->no_need_for_pri_ill_pin_everything */
+	if (!master->can_fault)
+		return -ENODEV;
+
+	master->processes++;
+
+	if (!first)
+		return 0;
+
+	spin_lock(&smmu->asid_lock);
+	ret = arm_smmu_process_share(smmu_domain, smmu_process);
+	spin_unlock(&smmu->asid_lock);
+	if (ret)
+		return ret;
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, &smmu_process->ctx_desc);
+
+	return 0;
+}
+
+static void arm_smmu_process_detach(struct iommu_domain *domain,
+				    struct device *dev,
+				    struct iommu_process *process, bool last)
+{
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	master->processes--;
+
+	if (last) {
+		spin_lock(&smmu->asid_lock);
+		asid_state = idr_find(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+		if (--asid_state->refs == 0) {
+			idr_remove(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+			kfree(asid_state);
+		}
+		spin_unlock(&smmu->asid_lock);
+
+		arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+	}
+
+	/* TODO: Invalidate ATC. */
+	/* TODO: Invalidate all mappings if last and not DVM. */
+}
+
+static void arm_smmu_process_invalidate(struct iommu_domain *domain,
+					struct iommu_process *process,
+					unsigned long iova, size_t size)
+{
+	/*
+	 * TODO: Invalidate ATC.
+	 * TODO: Invalidate mapping if not DVM
+	 */
+}
+
+static void arm_smmu_process_exit(struct iommu_domain *domain,
+				  struct iommu_process *process)
+{
+	struct arm_smmu_master_data *master;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+
+	if (!domain->process_exit)
+		return;
+
+	spin_lock(&smmu_domain->devices_lock);
+	list_for_each_entry(master, &smmu_domain->devices, list) {
+		if (!master->processes)
+			continue;
+
+		master->processes--;
+		domain->process_exit(domain, master->dev, process->pasid,
+				     domain->process_exit_token);
+
+		/* TODO: inval ATC */
+	}
+	spin_unlock(&smmu_domain->devices_lock);
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+
+	/* TODO: Invalidate all mappings if not DVM */
+}
+
 static struct platform_driver arm_smmu_driver;
 
 static int arm_smmu_match_node(struct device *dev, void *data)
@@ -2351,6 +2552,12 @@ static struct iommu_ops arm_smmu_ops = {
 	.domain_alloc		= arm_smmu_domain_alloc,
 	.domain_free		= arm_smmu_domain_free,
 	.attach_dev		= arm_smmu_attach_dev,
+	.process_alloc		= arm_smmu_process_alloc,
+	.process_free		= arm_smmu_process_free,
+	.process_attach		= arm_smmu_process_attach,
+	.process_detach		= arm_smmu_process_detach,
+	.process_invalidate	= arm_smmu_process_invalidate,
+	.process_exit		= arm_smmu_process_exit,
 	.map			= arm_smmu_map,
 	.unmap			= arm_smmu_unmap,
 	.map_sg			= default_iommu_map_sg,
-- 
2.13.3


WARNING: multiple messages have this Message-ID (diff)
From: jean-philippe.brucker@arm.com (Jean-Philippe Brucker)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFCv2 PATCH 21/36] iommu/arm-smmu-v3: Implement process operations
Date: Fri,  6 Oct 2017 14:31:48 +0100	[thread overview]
Message-ID: <20171006133203.22803-22-jean-philippe.brucker@arm.com> (raw)
In-Reply-To: <20171006133203.22803-1-jean-philippe.brucker@arm.com>

Hook process operations to support PASID and page table sharing with the
SMMUv3:

* process_allocate pins down its ASID and initializes the context
  descriptor fields.
* process_free releases the ASID.
* process_attach checks device capabilities and writes the context
  descriptor. More work is required to ensure that the process' ASID isn't
  being used for io-pgtables.
* process_detach clears the context descriptor and sends required
  invalidations.
* process_invalidate sends required invalidations.
* process_exit stops us of the PASID, clears the context descriptor and
  performs required invalidations.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
---
 drivers/iommu/arm-smmu-v3.c | 207 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)

diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 71fc3a2c8a95..c86a1182c137 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/iommu.h>
 #include <linux/iopoll.h>
+#include <linux/mmu_context.h>
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of.h>
@@ -37,6 +38,7 @@
 #include <linux/of_platform.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/sched/mm.h>
 
 #include <linux/amba/bus.h>
 
@@ -642,6 +644,7 @@ struct arm_smmu_strtab_cfg {
 
 struct arm_smmu_asid_state {
 	struct arm_smmu_domain		*domain;
+	unsigned long			refs;
 };
 
 /* An SMMUv3 instance */
@@ -712,6 +715,9 @@ struct arm_smmu_master_data {
 	struct device			*dev;
 
 	size_t				num_ssids;
+	bool				can_fault;
+	/* Number of processes attached */
+	int				processes;
 };
 
 /* SMMU private data for an IOMMU domain */
@@ -740,6 +746,11 @@ struct arm_smmu_domain {
 	spinlock_t			devices_lock;
 };
 
+struct arm_smmu_process {
+	struct iommu_process		process;
+	struct arm_smmu_ctx_desc	ctx_desc;
+};
+
 struct arm_smmu_option_prop {
 	u32 opt;
 	const char *prop;
@@ -766,6 +777,11 @@ static struct arm_smmu_domain *to_smmu_domain(struct iommu_domain *dom)
 	return container_of(dom, struct arm_smmu_domain, domain);
 }
 
+static struct arm_smmu_process *to_smmu_process(struct iommu_process *process)
+{
+	return container_of(process, struct arm_smmu_process, process);
+}
+
 static void parse_driver_options(struct arm_smmu_device *smmu)
 {
 	int i = 0;
@@ -2032,6 +2048,13 @@ static void arm_smmu_detach_dev(struct device *dev)
 	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
 	struct arm_smmu_domain *smmu_domain = master->domain;
 
+	/*
+	 * Core is preventing concurrent calls between attach and bind, so this
+	 * read only races with process_exit (FIXME).
+	 */
+	if (master->processes)
+		__iommu_process_unbind_dev_all(&smmu_domain->domain, dev);
+
 	if (smmu_domain) {
 		spin_lock_irqsave(&smmu_domain->devices_lock, flags);
 		list_del(&master->list);
@@ -2143,6 +2166,184 @@ arm_smmu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova)
 	return ops->iova_to_phys(ops, iova);
 }
 
+static int arm_smmu_process_init_pgtable(struct arm_smmu_process *smmu_process,
+					 struct mm_struct *mm)
+{
+	int asid;
+
+	asid = mm_context_get(mm);
+	if (!asid)
+		return -ENOSPC;
+
+	smmu_process->ctx_desc.asid = asid;
+	/* TODO: init the rest */
+
+	return 0;
+}
+
+static struct iommu_process *arm_smmu_process_alloc(struct task_struct *task)
+{
+	int ret;
+	struct mm_struct *mm;
+	struct arm_smmu_process *smmu_process;
+
+	smmu_process = kzalloc(sizeof(*smmu_process), GFP_KERNEL);
+
+	mm = get_task_mm(task);
+	if (!mm) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	ret = arm_smmu_process_init_pgtable(smmu_process, mm);
+	mmput(mm);
+	if (ret) {
+		kfree(smmu_process);
+		return NULL;
+	}
+
+	return &smmu_process->process;
+}
+
+static void arm_smmu_process_free(struct iommu_process *process)
+{
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+
+	/* Unpin ASID */
+	mm_context_put(process->mm);
+
+	kfree(smmu_process);
+}
+
+static int arm_smmu_process_share(struct arm_smmu_domain *smmu_domain,
+				  struct arm_smmu_process *smmu_process)
+{
+	int asid, ret;
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	asid = smmu_process->ctx_desc.asid;
+
+	asid_state = idr_find(&smmu->asid_idr, asid);
+	if (asid_state && asid_state->domain) {
+		return -EEXIST;
+	} else if (asid_state) {
+		asid_state->refs++;
+		return 0;
+	}
+
+	asid_state = kzalloc(sizeof(*asid_state), GFP_ATOMIC);
+	asid_state->refs = 1;
+
+	if (!asid_state)
+		return -ENOMEM;
+
+	ret = idr_alloc(&smmu->asid_idr, asid_state, asid, asid + 1, GFP_ATOMIC);
+	return ret < 0 ? ret : 0;
+}
+
+static int arm_smmu_process_attach(struct iommu_domain *domain,
+				   struct device *dev,
+				   struct iommu_process *process, bool first)
+{
+	int ret;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+
+	if (!(smmu->features & ARM_SMMU_FEAT_SVM))
+		return -ENODEV;
+
+	/* TODO: process->no_pasid */
+	if (process->pasid >= master->num_ssids)
+		return -ENODEV;
+
+	/* TODO: process->no_need_for_pri_ill_pin_everything */
+	if (!master->can_fault)
+		return -ENODEV;
+
+	master->processes++;
+
+	if (!first)
+		return 0;
+
+	spin_lock(&smmu->asid_lock);
+	ret = arm_smmu_process_share(smmu_domain, smmu_process);
+	spin_unlock(&smmu->asid_lock);
+	if (ret)
+		return ret;
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, &smmu_process->ctx_desc);
+
+	return 0;
+}
+
+static void arm_smmu_process_detach(struct iommu_domain *domain,
+				    struct device *dev,
+				    struct iommu_process *process, bool last)
+{
+	struct arm_smmu_asid_state *asid_state;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct arm_smmu_process *smmu_process = to_smmu_process(process);
+	struct arm_smmu_master_data *master = dev->iommu_fwspec->iommu_priv;
+	struct arm_smmu_device *smmu = smmu_domain->smmu;
+
+	master->processes--;
+
+	if (last) {
+		spin_lock(&smmu->asid_lock);
+		asid_state = idr_find(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+		if (--asid_state->refs == 0) {
+			idr_remove(&smmu->asid_idr, smmu_process->ctx_desc.asid);
+			kfree(asid_state);
+		}
+		spin_unlock(&smmu->asid_lock);
+
+		arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+	}
+
+	/* TODO: Invalidate ATC. */
+	/* TODO: Invalidate all mappings if last and not DVM. */
+}
+
+static void arm_smmu_process_invalidate(struct iommu_domain *domain,
+					struct iommu_process *process,
+					unsigned long iova, size_t size)
+{
+	/*
+	 * TODO: Invalidate ATC.
+	 * TODO: Invalidate mapping if not DVM
+	 */
+}
+
+static void arm_smmu_process_exit(struct iommu_domain *domain,
+				  struct iommu_process *process)
+{
+	struct arm_smmu_master_data *master;
+	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+
+	if (!domain->process_exit)
+		return;
+
+	spin_lock(&smmu_domain->devices_lock);
+	list_for_each_entry(master, &smmu_domain->devices, list) {
+		if (!master->processes)
+			continue;
+
+		master->processes--;
+		domain->process_exit(domain, master->dev, process->pasid,
+				     domain->process_exit_token);
+
+		/* TODO: inval ATC */
+	}
+	spin_unlock(&smmu_domain->devices_lock);
+
+	arm_smmu_write_ctx_desc(smmu_domain, process->pasid, NULL);
+
+	/* TODO: Invalidate all mappings if not DVM */
+}
+
 static struct platform_driver arm_smmu_driver;
 
 static int arm_smmu_match_node(struct device *dev, void *data)
@@ -2351,6 +2552,12 @@ static struct iommu_ops arm_smmu_ops = {
 	.domain_alloc		= arm_smmu_domain_alloc,
 	.domain_free		= arm_smmu_domain_free,
 	.attach_dev		= arm_smmu_attach_dev,
+	.process_alloc		= arm_smmu_process_alloc,
+	.process_free		= arm_smmu_process_free,
+	.process_attach		= arm_smmu_process_attach,
+	.process_detach		= arm_smmu_process_detach,
+	.process_invalidate	= arm_smmu_process_invalidate,
+	.process_exit		= arm_smmu_process_exit,
 	.map			= arm_smmu_map,
 	.unmap			= arm_smmu_unmap,
 	.map_sg			= default_iommu_map_sg,
-- 
2.13.3

  parent reply	other threads:[~2017-10-06 13:31 UTC|newest]

Thread overview: 268+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 13:31 [RFCv2 PATCH 00/36] Process management for IOMMU + SVM for SMMUv3 Jean-Philippe Brucker
2017-10-06 13:31 ` Jean-Philippe Brucker
2017-10-06 13:31 ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 02/36] iommu: Add a process_exit callback for device drivers Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 03/36] iommu/process: Add public function to search for a process Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
     [not found] ` <20171006133203.22803-1-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-10-06 13:31   ` [RFCv2 PATCH 01/36] iommu: Keep track of processes and PASIDs Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-23 11:04     ` Liu, Yi L
2017-10-23 11:04       ` Liu, Yi L
2017-10-23 11:04       ` Liu, Yi L
2017-10-23 12:17       ` Jean-Philippe Brucker
2017-10-23 12:17         ` Jean-Philippe Brucker
2017-10-23 12:17         ` Jean-Philippe Brucker
     [not found]         ` <7aaf9851-9546-f34d-1496-cbeea404abbd-5wv7dgnIgG8@public.gmane.org>
2017-10-25 18:05           ` Raj, Ashok
2017-10-25 18:05             ` Raj, Ashok
2017-10-25 18:05             ` Raj, Ashok
2017-10-30 10:28             ` Jean-Philippe Brucker
2017-10-30 10:28               ` Jean-Philippe Brucker
2017-10-30 10:28               ` Jean-Philippe Brucker
     [not found]     ` <20171006133203.22803-2-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-10-20 23:32       ` Sinan Kaya
2017-10-20 23:32         ` Sinan Kaya
2017-10-20 23:32         ` Sinan Kaya
2017-11-02 16:20         ` Jean-Philippe Brucker
2017-11-02 16:20           ` Jean-Philippe Brucker
2017-11-02 16:20           ` Jean-Philippe Brucker
2017-11-08 17:50       ` Bharat Kumar Gogada
2017-11-08 17:50         ` Bharat Kumar Gogada
2017-11-08 17:50         ` Bharat Kumar Gogada
2017-11-09 12:13         ` Jean-Philippe Brucker
2017-11-09 12:13           ` Jean-Philippe Brucker
2017-11-09 12:13           ` Jean-Philippe Brucker
     [not found]         ` <BLUPR0201MB150538FDD455F6042803B54FA5560-hRBPhS1iNj/g9tdZWAsUFxrHTHEw16jenBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-09 12:16           ` Jean-Philippe Brucker
2017-11-09 12:16             ` Jean-Philippe Brucker
2017-11-09 12:16             ` Jean-Philippe Brucker
     [not found]             ` <16b6ba80-b15b-b278-0d06-350ae0201e82-5wv7dgnIgG8@public.gmane.org>
2017-11-13 11:06               ` Bharat Kumar Gogada
2017-11-13 11:06                 ` Bharat Kumar Gogada
2017-11-13 11:06                 ` Bharat Kumar Gogada
2017-11-22  3:15     ` Bob Liu
2017-11-22  3:15       ` Bob Liu
2017-11-22  3:15       ` Bob Liu
2017-11-22 13:04       ` Jean-Philippe Brucker
2017-11-22 13:04         ` Jean-Philippe Brucker
2017-11-22 13:04         ` Jean-Philippe Brucker
     [not found]         ` <42f815ee-2a9a-ac49-2392-5c03c1d4c809-5wv7dgnIgG8@public.gmane.org>
2017-11-23 10:33           ` Bob Liu
2017-11-23 10:33             ` Bob Liu
2017-11-23 10:33             ` Bob Liu
2017-10-06 13:31   ` [RFCv2 PATCH 04/36] iommu/process: Track process changes with an mmu_notifier Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 05/36] iommu/process: Bind and unbind process to and from devices Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-11 11:33     ` Joerg Roedel
2017-10-11 11:33       ` Joerg Roedel
2017-10-12 11:13       ` Jean-Philippe Brucker
2017-10-12 11:13         ` Jean-Philippe Brucker
2017-10-12 11:13         ` Jean-Philippe Brucker
     [not found]         ` <ee7f80e3-ca30-0ee7-53f3-3e57b2b58df6-5wv7dgnIgG8@public.gmane.org>
2017-10-12 12:47           ` Joerg Roedel
2017-10-12 12:47             ` Joerg Roedel
2017-10-12 12:47             ` Joerg Roedel
     [not found]     ` <20171006133203.22803-6-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-10-21 15:47       ` Sinan Kaya
2017-10-21 15:47         ` Sinan Kaya
2017-10-21 15:47         ` Sinan Kaya
     [not found]         ` <683a518d-0e22-c855-2416-2e097ec3291d-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-11-02 16:21           ` Jean-Philippe Brucker
2017-11-02 16:21             ` Jean-Philippe Brucker
2017-11-02 16:21             ` Jean-Philippe Brucker
2017-11-29  6:08     ` Yisheng Xie
2017-11-29  6:08       ` Yisheng Xie
2017-11-29  6:08       ` Yisheng Xie
2017-11-29 15:01       ` Jean-Philippe Brucker
2017-11-29 15:01         ` Jean-Philippe Brucker
2017-11-29 15:01         ` Jean-Philippe Brucker
2017-11-30  1:11         ` Yisheng Xie
2017-11-30  1:11           ` Yisheng Xie
2017-11-30  1:11           ` Yisheng Xie
2017-11-30 13:39           ` Jean-Philippe Brucker
2017-11-30 13:39             ` Jean-Philippe Brucker
2017-11-30 13:39             ` Jean-Philippe Brucker
2018-01-19  4:52     ` Sinan Kaya
2018-01-19  4:52       ` Sinan Kaya
2018-01-19  4:52       ` Sinan Kaya
     [not found]       ` <0772e71e-4861-1e7b-f248-88aaba8bf2fc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-01-19 10:27         ` Jean-Philippe Brucker
2018-01-19 10:27           ` Jean-Philippe Brucker
2018-01-19 10:27           ` Jean-Philippe Brucker
2018-01-19 13:07           ` okaya
2018-01-19 13:07             ` okaya at codeaurora.org
2018-01-19 13:07             ` okaya
2017-10-06 13:31   ` [RFCv2 PATCH 06/36] iommu: Extend fault reporting Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 07/36] iommu: Add a fault handler Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 08/36] iommu/fault: Handle mm faults Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 13/36] iommu/of: Add stall and pasid properties to iommu_fwspec Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 19/36] arm64: mm: Pin down ASIDs for sharing contexts with devices Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 20/36] iommu/arm-smmu-v3: Track ASID state Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker [this message]
2017-10-06 13:31     ` [RFCv2 PATCH 21/36] iommu/arm-smmu-v3: Implement process operations Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-11-09  3:32     ` Yisheng Xie
2017-11-09  3:32       ` Yisheng Xie
2017-11-09  3:32       ` Yisheng Xie
2017-11-09 12:08       ` Jean-Philippe Brucker
2017-11-09 12:08         ` Jean-Philippe Brucker
2017-11-09 12:08         ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 23/36] iommu/arm-smmu-v3: Share process page tables Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 28/36] iommu/arm-smmu-v3: Maintain a SID->device structure Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 29/36] iommu/arm-smmu-v3: Add stall support for platform devices Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31   ` [RFCv2 PATCH 30/36] ACPI/IORT: Check ATS capability in root complex nodes Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:31     ` Jean-Philippe Brucker
2017-10-06 13:32   ` [RFCv2 PATCH 34/36] PCI: Make "PRG Response PASID Required" handling common Jean-Philippe Brucker
2017-10-06 13:32     ` Jean-Philippe Brucker
2017-10-06 13:32     ` Jean-Philippe Brucker
     [not found]     ` <20171006133203.22803-35-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-10-06 18:11       ` Bjorn Helgaas
2017-10-06 18:11         ` Bjorn Helgaas
2017-10-06 18:11         ` Bjorn Helgaas
2017-10-06 13:32   ` [RFCv2 PATCH 35/36] iommu/arm-smmu-v3: Add support for PRI Jean-Philippe Brucker
2017-10-06 13:32     ` Jean-Philippe Brucker
2017-10-06 13:32     ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 09/36] iommu/fault: Allow blocking fault handlers Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
     [not found]   ` <20171006133203.22803-10-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-11-29  6:15     ` Yisheng Xie
2017-11-29  6:15       ` Yisheng Xie
2017-11-29  6:15       ` Yisheng Xie
     [not found]       ` <7e1c8ea4-e568-1000-17de-62f8562c7169-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-29 15:01         ` Jean-Philippe Brucker
2017-11-29 15:01           ` Jean-Philippe Brucker
2017-11-29 15:01           ` Jean-Philippe Brucker
     [not found]           ` <74891e35-17d8-5831-1ebd-18e00ce00d74-5wv7dgnIgG8@public.gmane.org>
2017-11-30  2:45             ` Yisheng Xie
2017-11-30  2:45               ` Yisheng Xie
2017-11-30  2:45               ` Yisheng Xie
2017-10-06 13:31 ` [RFCv2 PATCH 10/36] vfio: Add support for Shared Virtual Memory Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-11-24  8:23   ` Bob Liu
2017-11-24  8:23     ` Bob Liu
2017-11-24  8:23     ` Bob Liu
2017-11-24 10:58     ` Jean-Philippe Brucker
2017-11-24 10:58       ` Jean-Philippe Brucker
2017-11-24 10:58       ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 11/36] iommu/arm-smmu-v3: Link domains and devices Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 12/36] dt-bindings: document stall and PASID properties for IOMMU masters Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
     [not found]   ` <20171006133203.22803-13-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2017-10-13 19:10     ` Rob Herring
2017-10-13 19:10       ` Rob Herring
2017-10-13 19:10       ` Rob Herring
2017-10-16 10:23       ` Jean-Philippe Brucker
2017-10-16 10:23         ` Jean-Philippe Brucker
2017-10-16 10:23         ` Jean-Philippe Brucker
     [not found]         ` <e7288f51-1cfa-44ce-e3ce-e9f3daf91579-5wv7dgnIgG8@public.gmane.org>
2017-10-18  2:06           ` Rob Herring
2017-10-18  2:06             ` Rob Herring
2017-10-18  2:06             ` Rob Herring
2017-10-06 13:31 ` [RFCv2 PATCH 14/36] iommu/arm-smmu-v3: Add support for Substream IDs Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-11-02 12:49   ` Shameerali Kolothum Thodi
2017-11-02 12:49     ` Shameerali Kolothum Thodi
2017-11-02 12:49     ` Shameerali Kolothum Thodi
2017-11-02 15:51     ` Jean-Philippe Brucker
2017-11-02 15:51       ` Jean-Philippe Brucker
2017-11-02 15:51       ` Jean-Philippe Brucker
2017-11-02 17:02       ` Shameerali Kolothum Thodi
2017-11-02 17:02         ` Shameerali Kolothum Thodi
2017-11-02 17:02         ` Shameerali Kolothum Thodi
2017-11-03  5:45         ` Yisheng Xie
2017-11-03  5:45           ` Yisheng Xie
2017-11-03  5:45           ` Yisheng Xie
2017-11-03  9:37           ` Jean-Philippe Brucker
2017-11-03  9:37             ` Jean-Philippe Brucker
2017-11-03  9:37             ` Jean-Philippe Brucker
2017-11-03  9:39             ` Shameerali Kolothum Thodi
2017-11-03  9:39               ` Shameerali Kolothum Thodi
2017-11-03  9:39               ` Shameerali Kolothum Thodi
2017-11-06  0:50             ` Yisheng Xie
2017-11-06  0:50               ` Yisheng Xie
2017-11-06  0:50               ` Yisheng Xie
2017-10-06 13:31 ` [RFCv2 PATCH 15/36] iommu/arm-smmu-v3: Add second level of context descriptor table Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 16/36] iommu/arm-smmu-v3: Add support for VHE Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 17/36] iommu/arm-smmu-v3: Support broadcast TLB maintenance Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 18/36] iommu/arm-smmu-v3: Add SVM feature checking Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 22/36] iommu/io-pgtable-arm: Factor out ARM LPAE register defines Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 24/36] iommu/arm-smmu-v3: Steal private ASID from a domain Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 25/36] iommu/arm-smmu-v3: Use shared ASID set Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 26/36] iommu/arm-smmu-v3: Add support for Hardware Translation Table Update Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-12-06  6:51   ` Yisheng Xie
2017-12-06  6:51     ` Yisheng Xie
2017-12-06  6:51     ` Yisheng Xie
     [not found]     ` <d2ec2e61-f758-0394-41d2-555ae65feb0d-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-06 11:06       ` Jean-Philippe Brucker
2017-12-06 11:06         ` Jean-Philippe Brucker
2017-12-06 11:06         ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 27/36] iommu/arm-smmu-v3: Register fault workqueue Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 31/36] iommu/arm-smmu-v3: Add support for PCI ATS Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-11-16 14:19   ` Bharat Kumar Gogada
2017-11-16 14:19     ` Bharat Kumar Gogada
2017-11-16 14:19     ` Bharat Kumar Gogada
     [not found]     ` <BLUPR0201MB150565029F9260A528739ACBA52E0-hRBPhS1iNj/g9tdZWAsUFxrHTHEw16jenBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-16 15:03       ` Jean-Philippe Brucker
2017-11-16 15:03         ` Jean-Philippe Brucker
2017-11-16 15:03         ` Jean-Philippe Brucker
     [not found]         ` <673fda01-2ae0-87e4-637e-fe27096b6be0-5wv7dgnIgG8@public.gmane.org>
2017-11-17  6:11           ` Bharat Kumar Gogada
2017-11-17  6:11             ` Bharat Kumar Gogada
2017-11-17  6:11             ` Bharat Kumar Gogada
     [not found]             ` <BLUPR0201MB1505BC86D3838D13F38665E7A52F0-hRBPhS1iNj/g9tdZWAsUFxrHTHEw16jenBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-17 11:39               ` Jean-Philippe Brucker
2017-11-17 11:39                 ` Jean-Philippe Brucker
2017-11-17 11:39                 ` Jean-Philippe Brucker
2017-10-06 13:31 ` [RFCv2 PATCH 32/36] iommu/arm-smmu-v3: Hook ATC invalidation to process ops Jean-Philippe Brucker
2017-10-06 13:31   ` Jean-Philippe Brucker
2017-10-06 13:32 ` [RFCv2 PATCH 33/36] iommu/arm-smmu-v3: Disable tagged pointers Jean-Philippe Brucker
2017-10-06 13:32   ` Jean-Philippe Brucker
2017-10-06 13:32 ` [RFCv2 PATCH 36/36] iommu/arm-smmu-v3: Add support for PCI PASID Jean-Philippe Brucker
2017-10-06 13:32   ` Jean-Philippe Brucker
2017-10-09  9:49 ` [RFCv2 PATCH 00/36] Process management for IOMMU + SVM for SMMUv3 Yisheng Xie
2017-10-09  9:49   ` Yisheng Xie
2017-10-09  9:49   ` Yisheng Xie
2017-10-09 11:36   ` Jean-Philippe Brucker
2017-10-09 11:36     ` Jean-Philippe Brucker
2017-10-09 11:36     ` Jean-Philippe Brucker
     [not found]     ` <0fecd29e-eaf7-9503-b087-7bfbc251da88-5wv7dgnIgG8@public.gmane.org>
2017-10-12 12:05       ` Yisheng Xie
2017-10-12 12:05         ` Yisheng Xie
2017-10-12 12:05         ` Yisheng Xie
2017-10-12 12:55         ` Jean-Philippe Brucker
2017-10-12 12:55           ` Jean-Philippe Brucker
2017-10-12 12:55           ` Jean-Philippe Brucker
     [not found]           ` <8a1e090d-22e8-0295-a53f-bc3b5b7d7971-5wv7dgnIgG8@public.gmane.org>
2017-10-12 15:28             ` Jordan Crouse
2017-10-12 15:28               ` Jordan Crouse
2017-10-12 15:28               ` Jordan Crouse
     [not found]               ` <20171012152803.GA3027-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2017-10-23 13:00                 ` Jean-Philippe Brucker
2017-10-23 13:00                   ` Jean-Philippe Brucker
     [not found]                   ` <8539601d-ef7a-8dd0-2fc7-51240c292678-5wv7dgnIgG8@public.gmane.org>
2017-10-25 20:20                     ` Jordan Crouse
2017-10-25 20:20                       ` Jordan Crouse
     [not found]                       ` <20171025202015.GA6159-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-02-05 18:15                         ` Jordan Crouse
2018-02-05 18:15                           ` Jordan Crouse
     [not found]                           ` <20180205181513.GB878-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-02-05 18:43                             ` Jean-Philippe Brucker
2018-02-05 18:43                               ` Jean-Philippe Brucker
2017-11-08  1:21           ` Bob Liu
2017-11-08  1:21             ` Bob Liu
2017-11-08  1:21             ` Bob Liu
2017-11-08 10:50             ` Jean-Philippe Brucker
2017-11-08 10:50               ` Jean-Philippe Brucker
2017-11-08 10:50               ` Jean-Philippe Brucker

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=20171006133203.22803-22-jean-philippe.brucker@arm.com \
    --to=jean-philippe.brucker-5wv7dgnigg8@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=gabriele.paoloni-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sudeep.holla-5wv7dgnIgG8@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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: link
Be 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.