Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1524318ybp; Wed, 9 Oct 2019 15:49:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfZxm7IsY+iZqCmOctGif2q3Q8yv2fWOv9URURS14WhOArdZ3vbuNa4i9nw9XS5dz6zdPv X-Received: by 2002:a17:906:4895:: with SMTP id v21mr5200260ejq.2.1570661356808; Wed, 09 Oct 2019 15:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570661356; cv=none; d=google.com; s=arc-20160816; b=RCJPsWTKsOwfanx10u2B84SNWoWUAgtCsf1GeFNWa+grSzs0Y2OtFA1E+ASJkn/JKk 0Afo6OJ7dZkR/ExWyb55xaJu7yUXVG4oT+JGKUXsK78WcVQ3jNLALgSUz4pB1RaoyN1X JgV2hviSQ0TRW+Q1yImMWMiEQhLNQQbiq2L6MSHa4LroKSEN1IyOF0WHPFYxr/AZ/wm5 d8TRYCcF7gUOQu/lO5NyxUIVe1KC/hNrQwBXg0444w7+nnj8PGnMkEPim82gxSStUbnP FIdJaNC46RffdZX4iMOuIY2w2AjZfHHZEz1qtUKCkjmjoWnrZHl9H5AKn+VrFbGIP/S1 2Bng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I7Hm7aDiL8h6L6JqJWW2eLpzCNFWSQRqSbJuflNQuf0=; b=YviTWxEMVsUy5VR9f4g42s2Ggj/q3Zv5/motMUj3cWWGgPc0CBlDR+rEw2A/iF/+Dv h8Q15EB5ZjK0NEpagpq9GTFUTCg7ReLsP2eltpjhyN2o7wWv4+9jbwJAgBHRrFqmT516 vhbE6a4z3sebeKQszpmU77LZDPafZOybgj0x4fne4OdRoc5ZOHy7srPgrkeLo+AG2Q2S Dka2ZcqADxqekD3TXWcM4fCnyNpzUJvD1/zGtm7LSC6uPRxMjdSpT4pfr1IMgJSKTQzJ FEqfg+nKDsy4s2BSUGeLNLoqo6DHRr0rPY8gdFj61BkZczGHeGN+Ajr/9bl4Ow2jA5L3 xFEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bbdtngIW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h50si2091263ede.423.2019.10.09.15.48.53; Wed, 09 Oct 2019 15:49:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bbdtngIW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732233AbfJIWqp (ORCPT + 99 others); Wed, 9 Oct 2019 18:46:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731736AbfJIWqp (ORCPT ); Wed, 9 Oct 2019 18:46:45 -0400 Received: from localhost (unknown [69.71.4.100]) (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 27B9820B7C; Wed, 9 Oct 2019 22:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570661204; bh=T/sptErry+zYk95pBQaGv5ewZEsfKA7Zo0hyLyEPIq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bbdtngIW/1XIXa2HYPt9nI8DYeCsu41NxFgraLGnT40mZz/QrqLMgSYV0w6C7ZDSY mFue7vHyVXdqTpjRw8r39G469v35jYvYg9Ibyhjt4vBcNyYWbf0U7jj3obe3EaVPW+ Mr3Rpp9UzjbMDPhqnp/EO+aZVreadWgsxjQSv9MU= From: Bjorn Helgaas To: Kuppuswamy Sathyanarayanan , David Woodhouse , Joerg Roedel Cc: Ashok Raj , Keith Busch , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Bjorn Helgaas Subject: [PATCH 1/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM Date: Wed, 9 Oct 2019 17:45:50 -0500 Message-Id: <20191009224551.179497-2-helgaas@kernel.org> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog In-Reply-To: <20191009224551.179497-1-helgaas@kernel.org> References: <20191009224551.179497-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI interfaces (pci_reset_pri() and pci_enable_pri()), but those are only implemented when CONFIG_PCI_PRI is enabled. Previously INTEL_IOMMU_SVM selected PCI_PASID but not PCI_PRI, so the state of PCI_PRI depended on whether AMD_IOMMU (which selects PCI_PRI) was enabled or PCI_PRI was enabled explicitly. The behavior of iommu_enable_dev_iotlb() should not depend on whether AMD_IOMMU is enabled. Make it predictable by having INTEL_IOMMU_SVM select PCI_PRI so iommu_enable_dev_iotlb() always uses the full implementations of PRI interfaces. Signed-off-by: Bjorn Helgaas --- drivers/iommu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index e3842eabcfdd..b183c9f916b0 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -207,6 +207,7 @@ config INTEL_IOMMU_SVM bool "Support for Shared Virtual Memory with Intel IOMMU" depends on INTEL_IOMMU && X86 select PCI_PASID + select PCI_PRI select MMU_NOTIFIER help Shared Virtual Memory (SVM) provides a facility for devices -- 2.23.0.581.g78d2f28ef7-goog