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.2 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 66A74C432C3 for ; Thu, 28 Nov 2019 15:36:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1897021835 for ; Thu, 28 Nov 2019 15:36:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1897021835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A1CDC6B054B; Thu, 28 Nov 2019 10:36:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A4D26B054C; Thu, 28 Nov 2019 10:36:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86CFF6B054D; Thu, 28 Nov 2019 10:36:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id 6EA416B054B for ; Thu, 28 Nov 2019 10:36:50 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 2F267180AD804 for ; Thu, 28 Nov 2019 15:36:50 +0000 (UTC) X-FDA: 76206088980.06.rub61_3ba0c919e124d X-HE-Tag: rub61_3ba0c919e124d X-Filterd-Recvd-Size: 2101 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Nov 2019 15:36:49 +0000 (UTC) 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.