Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/802842/?format=api
{ "id": 802842, "url": "http://patchwork.ozlabs.org/api/patches/802842/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20170817181014.1257-5-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": "<20170817181014.1257-5-jonathan.derrick@intel.com>", "list_archive_url": null, "date": "2017-08-17T18:10:14", "name": "[v2,4/4] iommu: Prevent VMD child devices from being remapping targets", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d913629cfbf7b8178a7916b59a0ea4806a4f8e5d", "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/20170817181014.1257-5-jonathan.derrick@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/802842/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/802842/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 3xYDnH6MVMz9sPt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 18 Aug 2017 04:11:47 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753431AbdHQSLb (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 17 Aug 2017 14:11:31 -0400", "from mga09.intel.com ([134.134.136.24]:13743 \"EHLO mga09.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753898AbdHQSL1 (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tThu, 17 Aug 2017 14:11:27 -0400", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Aug 2017 11:11:26 -0700", "from eremita.lm.intel.com ([10.232.112.28])\n\tby orsmga005.jf.intel.com with ESMTP; 17 Aug 2017 11:11:26 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,389,1498546800\"; d=\"scan'208\";a=\"138830405\"", "From": "Jon Derrick <jonathan.derrick@intel.com>", "To": "<linux-pci@vger.kernel.org>, <iommu@lists.linux-foundation.org>", "Cc": "Bjorn Helgaas <helgaas@kernel.org>,\n\tDavid Woodhouse <dwmw2@infradead.org>,\n\tKeith Busch <keith.busch@intel.com>, Scott Bauer <scott.bauer@intel.com>,\n\tDavid Fugate <david.fugate@intel.com>, <linux-kernel@vger.kernel.org>,\n\tJon Derrick <jonathan.derrick@intel.com>", "Subject": "[PATCH v2 4/4] iommu: Prevent VMD child devices from being\n\tremapping targets", "Date": "Thu, 17 Aug 2017 12:10:14 -0600", "Message-Id": "<20170817181014.1257-5-jonathan.derrick@intel.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20170817181014.1257-1-jonathan.derrick@intel.com>", "References": "<20170817181014.1257-1-jonathan.derrick@intel.com>", "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---\n drivers/iommu/intel-iommu.c | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c\nindex 687f18f..94353a6e 100644\n--- a/drivers/iommu/intel-iommu.c\n+++ b/drivers/iommu/intel-iommu.c\n@@ -901,6 +901,11 @@ 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+\t\t/* VMD child devices currently cannot be handled individually */\n+\t\tif (is_vmd(pdev->bus))\n+\t\t\treturn NULL;\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": [ "v2", "4/4" ] }