Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6919015ybc; Thu, 28 Nov 2019 07:40:33 -0800 (PST) X-Google-Smtp-Source: APXvYqz8KYxhkBwpu0OXEvEdFRh6uDs/vsk71wF5jUPy4MU59o3ol0Jeb9deOhPRX0V08jkN77D9 X-Received: by 2002:a50:9b10:: with SMTP id o16mr38216014edi.117.1574955632898; Thu, 28 Nov 2019 07:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574955632; cv=none; d=google.com; s=arc-20160816; b=mgsgQ4mTHXUqhj7j5GwjrQlCMPpKVkBMQlfXRT5XySXWtFRdBEpeRxSPGKm0T/P08E 7XeyWG00gWzKo+YlaM4SDcRyyF8SiNKxO3vjyxnA93GrQet70p9960kZrCECzHgn65IC +cRbWqfJ8/s6wcCPk+XGYWCVMNa6ii/a3S3uSv78xgqIjNomzriB3RVDITE1bYTBnN+O 1ZjZMK7YLIl4udbCjVNAqd7p8AGleexSr2irQ3ySZ28p5BHH9yLy5DwQp+g8L0ZFM6hu 0HeN1V3FLsxC5Fgs8QG1siDrEKqeokdhjD/RKtpgXpPKNgqIniYGLFTygkA71UWtmm5f rLKw== 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=WCGE40CNQQ6JgR+oSxnP/aapAT3uXbIPSi3vqtgepXY=; b=SlM39+wi6fNZ70al8ViTicC9FUrZsWp5oAF9pAZl0zYCI3qZMUp2xqWd9wN/5zb+wm Dwi3VIc+F57RxYDBAXiYTbMVZRXpW325O+RzCYNyrLliDj3Ph0u5+Hq3Fm/DdAwtgH4E O3vvQMTO/StgjUfP3FfU993gfsp0zzmU9TnMBxycjAmjCfs0ho/d5UcZXq1rsLl/gCJf qey3l5k23TrKZQbT+pNdUKU352Isstq1wZUK2uPucybstO/QMJJtRdCC4v0Gp+1i9fls pfjqW5CvugRK3T4Eln2doqA/5O/6VJDavVReQwV+6JWv6fW5AjcKMVsXVUpzWUgi9qUG 2FGQ== 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 x20si67458eds.187.2019.11.28.07.40.08; Thu, 28 Nov 2019 07:40:32 -0800 (PST) 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 S1726594AbfK1Pgt (ORCPT + 99 others); Thu, 28 Nov 2019 10:36:49 -0500 Received: from verein.lst.de ([213.95.11.211]:52769 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfK1Pgt (ORCPT ); Thu, 28 Nov 2019 10:36:49 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 5692068B05; Thu, 28 Nov 2019 16:36:46 +0100 (CET) Date: Thu, 28 Nov 2019 16:36:46 +0100 From: "hch@lst.de" To: Thomas Hellstrom Cc: "hch@lst.de" , "thomas.lendacky@amd.com" , "linux-kernel@vger.kernel.org" , "christian.koenig@amd.com" , "linux-mm@kvack.org" , "iommu@lists.linux-foundation.org" , Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/2] dma-mapping: force unencryped devices are always addressing limited Message-ID: <20191128153646.GA29430@lst.de> References: <20191127144006.25998-1-hch@lst.de> <20191127144006.25998-3-hch@lst.de> <20191128075153.GD20659@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 Thu, Nov 28, 2019 at 08:02:16AM +0000, Thomas Hellstrom wrote: > > We have a hard time handling that in generic code. Do we have any > > good use case for SWIOTLB_FORCE not that we have force_dma_unencrypted? > > I'd love to be able to get rid of it.. > > > IIRC the justification for it is debugging. Drivers that don't do > syncing correctly or have incorrect assumptions of initialization of DMA > memory will not work properly when SWIOTLB is forced. We recently found > a vmw_pvscsi device flaw that way... Ok. I guess debugging is reasonable. Although that means I need to repsin this quite a bit as I now need a callout to dma_direct. I'll respin it in the next days.