Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807906/?format=api
{ "id": 807906, "url": "http://patchwork.ozlabs.org/api/patches/807906/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/1504127159-186529-1-git-send-email-jonathan.derrick@intel.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504127159-186529-1-git-send-email-jonathan.derrick@intel.com>", "list_archive_url": null, "date": "2017-08-30T21:05:59", "name": "[v3] iommu: Prevent VMD child devices from being remapping targets", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a580d915c4b7d8acdfe0541f3b6ba14feede9c8e", "submitter": { "id": 68102, "url": "http://patchwork.ozlabs.org/api/people/68102/?format=api", "name": "Jon Derrick", "email": "jonathan.derrick@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/1504127159-186529-1-git-send-email-jonathan.derrick@intel.com/mbox/", "series": [ { "id": 701, "url": "http://patchwork.ozlabs.org/api/series/701/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=701", "date": "2017-08-30T21:05:59", "name": "[v3] iommu: Prevent VMD child devices from being remapping targets", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/701/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807906/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807906/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pci-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjJJh5vwJz9sNw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 07:18:28 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750828AbdH3VS1 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 30 Aug 2017 17:18:27 -0400", "from mga01.intel.com ([192.55.52.88]:40312 \"EHLO mga01.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750814AbdH3VS0 (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tWed, 30 Aug 2017 17:18:26 -0400", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Aug 2017 14:18:26 -0700", "from nsgse-neoncity01.lm.intel.com (HELO\n\tnsgse-neoncity01.localdomain) ([10.232.118.5])\n\tby orsmga005.jf.intel.com with ESMTP; 30 Aug 2017 14:18:25 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,450,1498546800\"; d=\"scan'208\";a=\"143847715\"", "From": "Jon Derrick <jonathan.derrick@intel.com>", "To": "Bjorn Helgaas <helgaas@kernel.org>", "Cc": "<iommu@lists.linux-foundation.org>, <linux-pci@vger.kernel.org>,\n\tKeith Busch <keith.busch@intel.com>,\n\tJon Derrick <jonathan.derrick@intel.com>", "Subject": "[PATCH v3] iommu: Prevent VMD child devices from being remapping\n\ttargets", "Date": "Wed, 30 Aug 2017 15:05:59 -0600", "Message-Id": "<1504127159-186529-1-git-send-email-jonathan.derrick@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "Sender": "linux-pci-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pci.vger.kernel.org>", "X-Mailing-List": "linux-pci@vger.kernel.org" }, "content": "VMD child devices must use the VMD endpoint's ID as the requester.\nBecause of this, there needs to be a way to link the parent VMD\nendpoint's iommu group and associated mappings to the VMD child devices\nsuch that attaching and detaching child devices modify the endpoint's\nmappings, while preventing early detaching on a singular device removal\nor unbinding.\n\nThe reassignment of individual VMD child devices devices to VMs is\noutside the scope of VMD, but may be implemented in the future. For now\nit is best to prevent any such attempts.\n\nThis patch prevents VMD child devices from returning an IOMMU, which\nprevents it from exposing an iommu_group sysfs directories and allowing\nsubsequent binding by userspace-access drivers such as VFIO.\n\nSigned-off-by: Jon Derrick <jonathan.derrick@intel.com>\n---\nv2->3, wrapped in x86 ifdef to avoid ia64 compilation errors\n\n drivers/iommu/intel-iommu.c | 7 +++++++\n 1 file changed, 7 insertions(+)", "diff": "diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c\nindex 687f18f..2800a6e 100644\n--- a/drivers/iommu/intel-iommu.c\n+++ b/drivers/iommu/intel-iommu.c\n@@ -901,6 +901,13 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf\n \t\tstruct pci_dev *pf_pdev;\n \n \t\tpdev = to_pci_dev(dev);\n+\n+#ifdef CONFIG_X86\n+\t\t/* VMD child devices currently cannot be handled individually */\n+\t\tif (is_vmd(pdev->bus))\n+\t\t\treturn NULL;\n+#endif\n+\n \t\t/* VFs aren't listed in scope tables; we need to look up\n \t\t * the PF instead to find the IOMMU. */\n \t\tpf_pdev = pci_physfn(pdev);\n", "prefixes": [ "v3" ] }