All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org,
	virtualization@lists.linux-foundation.org,
	linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org
Cc: rjw@rjwysocki.net, lenb@kernel.org, lorenzo.pieralisi@arm.com,
	guohanjun@huawei.com, sudeep.holla@arm.com,
	gregkh@linuxfoundation.org, joro@8bytes.org, bhelgaas@google.com,
	mst@redhat.com, jasowang@redhat.com, jacob.jun.pan@intel.com,
	eric.auger@redhat.com, sebastien.boeuf@intel.com,
	kevin.tian@intel.com
Subject: [RFC 10/13] iommu/virtio: Update IORT fwnode
Date: Fri, 22 Nov 2019 11:49:57 +0100	[thread overview]
Message-ID: <20191122105000.800410-11-jean-philippe@linaro.org> (raw)
In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org>

When the virtio-iommu uses the PCI transport and the topology is
described with IORT, register the PCI fwnode with IORT.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 drivers/iommu/virtio-iommu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 8efa368134c0..9847552faecc 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -7,6 +7,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/acpi_iort.h>
 #include <linux/amba/bus.h>
 #include <linux/delay.h>
 #include <linux/dma-iommu.h>
@@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu)
 		set_primary_fwnode(dev, fwnode);
 	}
 
+	/* Tell IORT about a PCI device's fwnode */
+	iort_iommu_update_fwnode(dev, dev->fwnode);
 	iommu_device_set_fwnode(&viommu->iommu, dev->fwnode);
 	return 0;
 }
@@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu)
 	if (!dev->fwnode)
 		return;
 
+	iort_iommu_update_fwnode(dev, NULL);
+
 	if (is_software_node(dev->fwnode)) {
 		struct fwnode_handle *fwnode = dev->fwnode;
 
-- 
2.24.0


WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org,
	virtualization@lists.linux-foundation.org,
	linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org
Cc: kevin.tian@intel.com, mst@redhat.com, gregkh@linuxfoundation.org,
	sudeep.holla@arm.com, rjw@rjwysocki.net,
	sebastien.boeuf@intel.com, jacob.jun.pan@intel.com,
	guohanjun@huawei.com, bhelgaas@google.com, jasowang@redhat.com,
	lenb@kernel.org
Subject: [RFC 10/13] iommu/virtio: Update IORT fwnode
Date: Fri, 22 Nov 2019 11:49:57 +0100	[thread overview]
Message-ID: <20191122105000.800410-11-jean-philippe@linaro.org> (raw)
In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org>

When the virtio-iommu uses the PCI transport and the topology is
described with IORT, register the PCI fwnode with IORT.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 drivers/iommu/virtio-iommu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 8efa368134c0..9847552faecc 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -7,6 +7,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/acpi_iort.h>
 #include <linux/amba/bus.h>
 #include <linux/delay.h>
 #include <linux/dma-iommu.h>
@@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu)
 		set_primary_fwnode(dev, fwnode);
 	}
 
+	/* Tell IORT about a PCI device's fwnode */
+	iort_iommu_update_fwnode(dev, dev->fwnode);
 	iommu_device_set_fwnode(&viommu->iommu, dev->fwnode);
 	return 0;
 }
@@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu)
 	if (!dev->fwnode)
 		return;
 
+	iort_iommu_update_fwnode(dev, NULL);
+
 	if (is_software_node(dev->fwnode)) {
 		struct fwnode_handle *fwnode = dev->fwnode;
 
-- 
2.24.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org,
	virtualization@lists.linux-foundation.org,
	linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org
Cc: kevin.tian@intel.com, lorenzo.pieralisi@arm.com, mst@redhat.com,
	gregkh@linuxfoundation.org, joro@8bytes.org,
	sudeep.holla@arm.com, rjw@rjwysocki.net, eric.auger@redhat.com,
	sebastien.boeuf@intel.com, jacob.jun.pan@intel.com,
	guohanjun@huawei.com, bhelgaas@google.com, jasowang@redhat.com,
	lenb@kernel.org
Subject: [RFC 10/13] iommu/virtio: Update IORT fwnode
Date: Fri, 22 Nov 2019 11:49:57 +0100	[thread overview]
Message-ID: <20191122105000.800410-11-jean-philippe@linaro.org> (raw)
In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org>

When the virtio-iommu uses the PCI transport and the topology is
described with IORT, register the PCI fwnode with IORT.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 drivers/iommu/virtio-iommu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 8efa368134c0..9847552faecc 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -7,6 +7,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/acpi_iort.h>
 #include <linux/amba/bus.h>
 #include <linux/delay.h>
 #include <linux/dma-iommu.h>
@@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu)
 		set_primary_fwnode(dev, fwnode);
 	}
 
+	/* Tell IORT about a PCI device's fwnode */
+	iort_iommu_update_fwnode(dev, dev->fwnode);
 	iommu_device_set_fwnode(&viommu->iommu, dev->fwnode);
 	return 0;
 }
@@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu)
 	if (!dev->fwnode)
 		return;
 
+	iort_iommu_update_fwnode(dev, NULL);
+
 	if (is_software_node(dev->fwnode)) {
 		struct fwnode_handle *fwnode = dev->fwnode;
 
-- 
2.24.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org,
	virtualization@lists.linux-foundation.org,
	linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org
Cc: rjw@rjwysocki.net, lenb@kernel.org, lorenzo.pieralisi@arm.com,
	guohanjun@huawei.com, sudeep.holla@arm.com,
	gregkh@linuxfoundation.org, joro@8bytes.org, bhelgaas@google.com,
	mst@redhat.com, jasowang@redhat.com, jacob.jun.pan@intel.com,
	eric.auger@redhat.com, sebastien.boeuf@intel.com,
	kevin.tian@intel.com
Subject: [virtio-dev] [RFC 10/13] iommu/virtio: Update IORT fwnode
Date: Fri, 22 Nov 2019 11:49:57 +0100	[thread overview]
Message-ID: <20191122105000.800410-11-jean-philippe@linaro.org> (raw)
In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org>

When the virtio-iommu uses the PCI transport and the topology is
described with IORT, register the PCI fwnode with IORT.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 drivers/iommu/virtio-iommu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 8efa368134c0..9847552faecc 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -7,6 +7,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/acpi_iort.h>
 #include <linux/amba/bus.h>
 #include <linux/delay.h>
 #include <linux/dma-iommu.h>
@@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu)
 		set_primary_fwnode(dev, fwnode);
 	}
 
+	/* Tell IORT about a PCI device's fwnode */
+	iort_iommu_update_fwnode(dev, dev->fwnode);
 	iommu_device_set_fwnode(&viommu->iommu, dev->fwnode);
 	return 0;
 }
@@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu)
 	if (!dev->fwnode)
 		return;
 
+	iort_iommu_update_fwnode(dev, NULL);
+
 	if (is_software_node(dev->fwnode)) {
 		struct fwnode_handle *fwnode = dev->fwnode;
 
-- 
2.24.0


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  parent reply	other threads:[~2019-11-22 11:16 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 10:49 [RFC 00/13] virtio-iommu on non-devicetree platforms Jean-Philippe Brucker
2019-11-22 10:49 ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 01/13] ACPI/IORT: Move IORT to the ACPI folder Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 02/13] ACPI: Add VIOT definitions Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 03/13] ACPI/IORT: Allow registration of external tables Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 04/13] ACPI/IORT: Add node categories Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 05/13] ACPI/IORT: Support VIOT virtio-mmio node Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 06/13] ACPI/IORT: Support VIOT virtio-pci node Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 07/13] ACPI/IORT: Defer probe until virtio-iommu-pci has registered a fwnode Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 08/13] ACPI/IORT: Add callback to update a device's fwnode Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 09/13] iommu/virtio: Create fwnode if necessary Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker [this message]
2019-11-22 10:49   ` [virtio-dev] [RFC 10/13] iommu/virtio: Update IORT fwnode Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC 11/13] ACPI: Add VIOT table Jean-Philippe Brucker
2019-11-22 10:49 ` Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49 ` [RFC virtio 12/13] virtio-iommu: Add built-in topology description Jean-Philippe Brucker
2019-11-22 10:49   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:49   ` Jean-Philippe Brucker
2019-11-22 10:50 ` [RFC 13/13] iommu/virtio: Add topology description to Jean-Philippe Brucker
2019-11-22 10:50   ` [virtio-dev] " Jean-Philippe Brucker
2019-11-22 10:50   ` Jean-Philippe Brucker
2019-11-22 10:50   ` Jean-Philippe Brucker
2019-11-22 10:50   ` Jean-Philippe Brucker
2019-11-22 12:53   ` Michael S. Tsirkin
2019-11-22 12:53     ` [virtio-dev] " Michael S. Tsirkin
2019-11-22 12:53     ` Michael S. Tsirkin
2019-11-22 12:53     ` Michael S. Tsirkin
2019-11-25 17:48     ` Jean-Philippe Brucker
2019-11-25 17:48     ` Jean-Philippe Brucker
2019-11-25 17:48       ` [virtio-dev] " Jean-Philippe Brucker
2019-11-25 17:48       ` Jean-Philippe Brucker
2019-11-25 17:48       ` Jean-Philippe Brucker
2019-11-22 12:53   ` Michael S. Tsirkin
2019-11-22 13:00 ` [RFC 00/13] virtio-iommu on non-devicetree platforms Michael S. Tsirkin
2019-11-22 13:00 ` Michael S. Tsirkin
2019-11-22 13:00   ` [virtio-dev] " Michael S. Tsirkin
2019-11-22 13:00   ` Michael S. Tsirkin
2019-11-22 13:00   ` Michael S. Tsirkin
2019-11-25 17:53   ` Jean-Philippe Brucker
2019-11-25 17:53   ` Jean-Philippe Brucker
2019-11-25 17:53     ` [virtio-dev] " Jean-Philippe Brucker
2019-11-25 17:53     ` Jean-Philippe Brucker
2019-11-25 17:53     ` Jean-Philippe Brucker
2019-11-23  0:01 ` Jacob Pan (Jun)
2019-11-23  0:01   ` Jacob Pan (Jun)
2019-11-23  0:01   ` Jacob Pan (Jun)
2019-11-25 18:02   ` Jean-Philippe Brucker
2019-11-25 18:02     ` [virtio-dev] " Jean-Philippe Brucker
2019-11-25 18:02     ` Jean-Philippe Brucker
2019-11-25 18:02     ` Jean-Philippe Brucker
2019-12-04  3:01     ` Jacob Pan (Jun)
2019-12-04  3:01       ` Jacob Pan (Jun)
2019-12-04  3:01       ` Jacob Pan (Jun)
2019-12-18 11:20       ` Jean-Philippe Brucker
2019-12-18 11:20         ` [virtio-dev] " Jean-Philippe Brucker
2019-12-18 11:20         ` Jean-Philippe Brucker
2019-12-18 11:20         ` Jean-Philippe Brucker
2019-12-20 18:54         ` Jacob Pan (Jun)
2019-12-20 18:54           ` Jacob Pan (Jun)
2019-12-20 18:54           ` Jacob Pan (Jun)
2019-12-18 11:20       ` Jean-Philippe Brucker
2019-11-25 18:02   ` 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=20191122105000.800410-11-jean-philippe@linaro.org \
    --to=jean-philippe@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=eric.auger@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guohanjun@huawei.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=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mst@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=sebastien.boeuf@intel.com \
    --cc=sudeep.holla@arm.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --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: 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.