From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 36017C3A5A3 for ; Tue, 27 Aug 2019 21:58:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0779420828 for ; Tue, 27 Aug 2019 21:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566943090; bh=HeT9zZPNITzAWKgcdu1Uzg0+26l04BJ3G84MUvHMRQ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=sC3VligXtRkgbW6mYVCTv78iDQTbFVk4HN+mo9N/5gv3mFvUnwofmCs/5bdqwB0RK M+FQ4IhOaB7pEjgSpXkYQXDsdJcASi+DkrDViiVQO4QFpQ1vQVBcJRZmRthvjxDpfZ rrn7iWMVG2TKdaE+9A7s1hNSyZFjZk34jL8XGMaM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbfH0V6J (ORCPT ); Tue, 27 Aug 2019 17:58:09 -0400 Received: from mga04.intel.com ([192.55.52.120]:52063 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbfH0V6J (ORCPT ); Tue, 27 Aug 2019 17:58:09 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2019 14:58:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,438,1559545200"; d="scan'208";a="381075305" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga006.fm.intel.com with ESMTP; 27 Aug 2019 14:58:08 -0700 Date: Tue, 27 Aug 2019 15:56:22 -0600 From: Keith Busch To: "Derrick, Jonathan" Cc: "hch@lst.de" , "x86@kernel.org" , "joro@8bytes.org" , "Busch, Keith" , "linux-pci@vger.kernel.org" , "bhelgaas@google.com" , "dwmw2@infradead.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] vmd: Stop overriding dma_map_ops Message-ID: <20190827215621.GB23412@localhost.localdomain> References: <20190826150652.10316-1-hch@lst.de> <8cad7eb5b5b37aeb041fd0c464383bb5223e4a64.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cad7eb5b5b37aeb041fd0c464383bb5223e4a64.camel@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Aug 27, 2019 at 11:24:05AM -0700, Derrick, Jonathan wrote: > On Mon, 2019-08-26 at 17:06 +0200, Christoph Hellwig wrote: > > With a little tweak to the intel-iommu code we should be able to work > > around the VMD mess for the requester IDs without having to create giant > > amounts of boilerplate DMA ops wrapping code. The other advantage of > > this scheme is that we can respect the real DMA masks for the actual > > devices, and I bet it will only be a matter of time until we'll see the > > first DMA challeneged NVMe devices. > > > > The only downside is that we can't offer vmd as a module given that > > intel-iommu calls into it. But the driver only has about 700 lines > > of code, so this should not be a major issue. > If we're going to remove its ability to be a module, and given its > small size, could we make this default =y? > > Otherwise we risk breaking platforms which have it enabled with OSVs > who miss enabling it Can we keep this as a module if we stick the remapping struct device in pci_sysdata instead of going through the vmd driver to get it? Otherwise, very happy to see this dma wrapping go away.