Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1019653yba; Wed, 24 Apr 2019 13:35:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy91Go+bhGsJwjTsSHADVkzxN3QjD3js4uzYSGnTNb3kKXSXUvOSbxBzQuPThJ4+WfShM7 X-Received: by 2002:a63:750c:: with SMTP id q12mr32847624pgc.133.1556138116094; Wed, 24 Apr 2019 13:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556138116; cv=none; d=google.com; s=arc-20160816; b=u7kHG+/kxp8cAvm1lKDQjmOyF/HD3IIiM1mZX93oPjIKbLMLoaoh3VoYMDXb3449m/ WWNGcEu5wMJVgtXgSrTNhemko30PN4lapcolJIwEg4TDm8P9kcZVPPbr0ZJvgKHv4F2v rbF7RRo0AhN52+/DJXnm206rPnseHFMNLNlss8jBSlUj927oiKo04XdUav8Er9A25RZW Czm8szZCjsHrI28MFyBb0LNLT+VTGzPJz7TtqhvysDoobKJj4pYY/nVy0fesASY3RrNp nviJmjpZgOzHEkll3bFbbQ13HEpTZZ4p6yO/qsdO89dWQuvoIyPyT2sRKzKz1r7JFox1 1aaA== 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=dNGw3pjQIpakCohlm7AhrgOP7g2kHmlG9F+PnsSjodA=; b=y50LFj3+MMZiItbchpLOIavd4te3yQpWLoe6oNUYWZmfk4mD+1461uHTVw3MOdo5c/ cH4CiMem0xrVgl9toTZNuF50lYQqI38cmd4kQHOEXUKx3B3xgNa1CyxOl9ORWrG/hzZ0 eavkXkS2ocqkcwbOzgNq8N791+WDOvk7o2wr2MXeNG/IvpW2Xft0wWCsKvylJAo+MZXV aqlnp2BXy2SpUsIJpPYrFanXxUZEUkCcCh/b5+JGLn9fuP4xOhiRZGYxCSuvohVkUOWK 7cFG8E1+fSV079dri2bpYtRu0CoOSecr9QpmzQqIZYMjyEITyiRCAJCzEW5q01tBpaCP 6Kfg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si3804775pgk.383.2019.04.24.13.34.46; Wed, 24 Apr 2019 13:35: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732157AbfDXOpv (ORCPT + 99 others); Wed, 24 Apr 2019 10:45:51 -0400 Received: from verein.lst.de ([213.95.11.211]:54312 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731885AbfDXOpt (ORCPT ); Wed, 24 Apr 2019 10:45:49 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id A2A4B67358; Wed, 24 Apr 2019 16:45:32 +0200 (CEST) Date: Wed, 24 Apr 2019 16:45:32 +0200 From: Christoph Hellwig To: Lu Baolu Cc: Christoph Hellwig , David Woodhouse , Joerg Roedel , ashok.raj@intel.com, jacob.jun.pan@intel.com, alan.cox@intel.com, kevin.tian@intel.com, mika.westerberg@linux.intel.com, pengfei.xu@intel.com, Konrad Rzeszutek Wilk , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 02/10] swiotlb: Factor out slot allocation and free Message-ID: <20190424144532.GA21480@lst.de> References: <20190421011719.14909-1-baolu.lu@linux.intel.com> <20190421011719.14909-3-baolu.lu@linux.intel.com> <20190422164555.GA31181@lst.de> <0c6e5983-312b-0d6b-92f5-64861cd6804d@linux.intel.com> <20190423061232.GB12762@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 Tue, Apr 23, 2019 at 03:32:16PM +0800, Lu Baolu wrote: > When we add the bounce buffer between IOVA and physical buffer, the > bounced buffer must starts from the same offset in a page, otherwise, > IOMMU can't work here. Why? Even with the odd hardware descriptors typical in Intel land that only allow offsets in the first page, not the following ones, having a zero offset where we previously had one should be fine.