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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 0B9E7C43331 for ; Tue, 12 Nov 2019 07:16:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D390C2053B for ; Tue, 12 Nov 2019 07:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725944AbfKLHQp (ORCPT ); Tue, 12 Nov 2019 02:16:45 -0500 Received: from verein.lst.de ([213.95.11.211]:54099 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbfKLHQp (ORCPT ); Tue, 12 Nov 2019 02:16:45 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 5E6C968B05; Tue, 12 Nov 2019 08:16:40 +0100 (CET) Date: Tue, 12 Nov 2019 08:16:40 +0100 From: Christoph Hellwig To: Lu Baolu Cc: Christoph Hellwig , David Woodhouse , Joerg Roedel , Bjorn Helgaas , ashok.raj@intel.com, jacob.jun.pan@intel.com, alan.cox@intel.com, kevin.tian@intel.com, mika.westerberg@linux.intel.com, Ingo Molnar , Greg Kroah-Hartman , pengfei.xu@intel.com, Konrad Rzeszutek Wilk , Marek Szyprowski , Robin Murphy , Jonathan Corbet , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Steven Rostedt , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jacob Pan Subject: Re: [PATCH v5 02/10] iommu/vt-d: Use per-device dma_ops Message-ID: <20191112071640.GA3343@lst.de> References: <20190725031717.32317-1-baolu.lu@linux.intel.com> <20190725031717.32317-3-baolu.lu@linux.intel.com> <20190725054413.GC24527@lst.de> <20190725114348.GA30957@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 09:56:51AM +0800, Lu Baolu wrote: > I think current code doesn't do the right thing. The user asks the iommu > driver to use identity domain for a device, but the driver force it back > to DMA domain because of the device address capability. > >> expensive. I don't think that this change is a good idea, and even if >> we decide that this is a good idea after all that should be done in a >> separate prep patch that explains the rationale. > > Yes. Make sense. Now that the bounce code has landed it might be good time to revisit this patch in isolation and with a better explanation.