Message ID | 20200114094400.718566344@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=X/91=3D=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4769AC33CB3 for <stable@archiver.kernel.org>; Tue, 14 Jan 2020 10:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19CC124685 for <stable@archiver.kernel.org>; Tue, 14 Jan 2020 10:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578996318; bh=VPYKbHK9cT8m+9JoWShICak7GUWHXzcF2k0ceTisMxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eHbYrrEmx5GByXYCTZzuNuZNaPiIFNZlHQufF9NszXN0DjjPdshQvdo52T6iYARnW MaGr5mtvMSsHgVn0pLdQXux97m9Ee6PmVAgdvZj8JDmw7w10XzxheSnHumChVf/XZX oxvK4mhS+5qps76+XCd58/8zzQBDBg0vMJnMxK9w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730082AbgANKFQ (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 14 Jan 2020 05:05:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:33256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729398AbgANKFQ (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 14 Jan 2020 05:05:16 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 922182467A; Tue, 14 Jan 2020 10:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578996315; bh=VPYKbHK9cT8m+9JoWShICak7GUWHXzcF2k0ceTisMxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tswaZspW5Uop8iIimI1abhRunxTws2rnbuhrpTABSvPhOylo5MTpdP0VHeL4bQsJF 51uux9jwWjEWL5UzRMxU/onee2wbF3q1agJEW3ulZPnIn+aleDJ91bEk6KtlH/FaRV V6cZQM6lX6wGJ+hefA/IwFazhHSVFW5Uz5RNjYlQ= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Patrick Steinhardt <ps@pks.im>, Lu Baolu <baolu.lu@linux.intel.com>, Joerg Roedel <jroedel@suse.de> Subject: [PATCH 5.4 54/78] iommu/vt-d: Fix adding non-PCI devices to Intel IOMMU Date: Tue, 14 Jan 2020 11:01:28 +0100 Message-Id: <20200114094400.718566344@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200114094352.428808181@linuxfoundation.org> References: <20200114094352.428808181@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -5786,6 +5786,13 @@ static void intel_iommu_apply_resv_regio WARN_ON_ONCE(!reserve_iova(&dmar_domain->iovad, start, end)); } +static struct iommu_group *intel_iommu_device_group(struct device *dev) +{ + if (dev_is_pci(dev)) + return pci_device_group(dev); + return generic_device_group(dev); +} + #ifdef CONFIG_INTEL_IOMMU_SVM struct intel_iommu *intel_svm_device_to_iommu(struct device *dev) { @@ -5958,7 +5965,7 @@ const struct iommu_ops intel_iommu_ops = .get_resv_regions = intel_iommu_get_resv_regions, .put_resv_regions = intel_iommu_put_resv_regions, .apply_resv_region = intel_iommu_apply_resv_region, - .device_group = pci_device_group, + .device_group = intel_iommu_device_group, .dev_has_feat = intel_iommu_dev_has_feat, .dev_feat_enabled = intel_iommu_dev_feat_enabled, .dev_enable_feat = intel_iommu_dev_enable_feat,