Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp14806ybl; Tue, 27 Aug 2019 14:59:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzro/7WQsLcfscqkF//4oPNk22ir4Fa+gSmhDUL12nI3g1gdqaGX1pBmdin1lGje6AbLQFm X-Received: by 2002:a65:684c:: with SMTP id q12mr505834pgt.405.1566943177345; Tue, 27 Aug 2019 14:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566943177; cv=none; d=google.com; s=arc-20160816; b=UzsK4npHRnC09EQQZVYiLjZPXUjKf178+AIvIgmrW8idV4zoOCfRh/rbYzz2V6Pjl/ 4WndlLxGkbsmRa5lCTeCu1JX1+qeG9JNuCATS7dwPaVsN75LqBtxHujQgJGL3w/zZqhl 3iLzpfkYzwyM+P0m6cXvSGDOwfof9mO5cUJ8Pd25DE0uSXt05+SwfDus0loneDQxKKN/ F4C7cKXjyfmcNIM+SNzqGUfAfaKv23lEhaYK3Pt3cv03A6KjtynaoKC4raxFM1GOlORm koL7h+oHeBNYSW9rVoeyi5yPuAZNpan/Qj7cweByhNCUEEEV8NvxujaehPYC//Fuk1ZO Uzrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=R/RmPOSUlcH9Y9KpaYUfGzzwC50lYx4ojKfRuB05i8o=; b=BRBmWWk+u6KkQDk/c4QUhkGTsVDL2lMGwiGFReJE82LZuj1bec1ak3z27FYJKCLkVQ qJoEoYj12l8O6T999oIdrWLbpW/l52IxZGG1UM5k+khnK6yMnI7MIkWr8RT2u8ek1zbW EF/6Qgrii0Z2pVNcnFBWCuQxJECeQEnlPTum7Gfsdrtbd5OP/EU6LDWx5ACdeyBpQLl4 A6PIDJGTzbydhmj8Lhlm/SG6UnrbeN1qW49/C3Sx2TlvUjjFyPMHY68T/CbmPqvR0Zod NliGTASw5y2WgjUqe3mGyBoATUeGbYgd4HDBqQP5GrICiBW8xylBfREnfuZsJykMDtCh xmZA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 l62si476695pge.590.2019.08.27.14.59.21; Tue, 27 Aug 2019 14:59:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbfH0V6J (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.