Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp33109pxh; Thu, 7 Apr 2022 13:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAvVlTBJlYkbvYuGQ5zRBGXbn7nLO7jeTMSdP8pfwk54i63pkhXm0NEgvqMRITXaqguKms X-Received: by 2002:a17:902:f70c:b0:14e:f1a4:d894 with SMTP id h12-20020a170902f70c00b0014ef1a4d894mr16160904plo.65.1649362023170; Thu, 07 Apr 2022 13:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649362023; cv=none; d=google.com; s=arc-20160816; b=rkd6Hjcm0FNvS4QlVMizAdYeP19quDyPT4PUSlkQz3G2KDFxYpNobM7nElxpcgWCeU dfTm/IbD/kXHgCiEY3m0BKyq2CR9rVMfntZD6oUage3x0vErYCJejfhp1w5tUbGZjoUC iroevOjLOcg2jTyxgJ49lrm9eSVaOdNDG/1Yl8Uk7RyQI8Zfldea9RgMvya+O9dzpkhf GlRYjXfVhrcjvGeuptfiFk3VyfDgP519vr1C8HAIRYCliGf1wgkp1r7QtkgkkIzauHg/ WcoIoNMVREOJtO3j8zfQjBY2z8szSLO/+nYicWSzcW32L1xqRkjqTi1o2gThmcl/at9j IpjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=74PS8gP8R7QSv7wDPjxMrGmI/chpbWr92QAHIh9FKHQ=; b=vpWLBCD1R7YB2XJAuiotap+Re2pLe/BGQ8Ms7mkcTuO1fHPxkKT+d4usP/XBZpSnMw 9G/ahqYSeJweZTV4t3CY2c4DZPyP/f+Pejlb51FKxTvBOXwmY1ZtKabVVcfExp4r+d9O 1O/xV6q5rupernW8rNwY3/a5MPE8DGJII7wFizdyh+g4CXAcRBCXFIJKPgwAZpLtDoty JhBqXtCTR+aXX56+VnnsQVkjXRbrfPPE3srJStfh7AhHlxn4B1RTh87VuRo2z6IArwH0 P2JhyY+Mk4DfpfnY1kpTyURw95CMenZ0Zs9B3Ri5Kigqy/ApnZZvWV7DkDvomS1W/dWd 2eqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IkEHrck5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c12-20020a056a00248c00b004fa9ef1a302si21796359pfv.234.2022.04.07.13.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:07:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IkEHrck5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34EB22A913B; Thu, 7 Apr 2022 12:30:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241418AbiDGNnc (ORCPT + 99 others); Thu, 7 Apr 2022 09:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343880AbiDGNnQ (ORCPT ); Thu, 7 Apr 2022 09:43:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A6F127B38 for ; Thu, 7 Apr 2022 06:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=74PS8gP8R7QSv7wDPjxMrGmI/chpbWr92QAHIh9FKHQ=; b=IkEHrck5evsyXCvHJjhJFDqRe7 MKO4XbmW1buUih3ZFgYRb+doKN2RDmupP3AtpfjaSAvRxJBSJ6Kq5eILoGdRBkllRwMckLuLlTdw1 IejvFTj3E4nxW3OrdBOkSAj7dDTJMbj9aPKzR+J9hcwy1kczQeCsXFCXLDJ8jscKrXFJ1HqFeJTyG XK3GnMYtx24bwuLTwd474UEXgIeZcMP9cviBdDt5xGgUM+eh4B3AMyFgtYbUCPvUx2/DH+3Y1jWgq BPfSAVO0NuwqPxVNWiE1pr7sqv9/ieP+7IvvDpUuCMxG2ovM4PPzGnh/2LVFcu5P9p9e4s5804xqt gHJwozxA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncSNp-00CCNM-SL; Thu, 07 Apr 2022 13:41:09 +0000 Date: Thu, 7 Apr 2022 06:41:09 -0700 From: Christoph Hellwig To: Robin Murphy Cc: Mario Limonciello , Joerg Roedel , Will Deacon , Christoph Hellwig , Marek Szyprowski , "open list:IOMMU DRIVERS" , Suthikulpanit Suravee , Hegde Vasant , open list Subject: Re: [PATCH v2 1/2] iommu/amd: Enable swiotlb in all cases Message-ID: References: <20220404204723.9767-1-mario.limonciello@amd.com> <20220404204723.9767-2-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2022 at 02:31:44PM +0100, Robin Murphy wrote: > FWIW it's also broken for another niche case where > iommu_default_passthrough() == false at init, but the user later changes a > 32-bit device's default domain type to passthrough via sysfs, such that it > starts needing regular dma-direct bouncing. Yeah. We also have yet another issue: swiotlb is not allocate if there is no memory outside the 4GB physical address space. I think I can fix that easily after my swiotlb init series goes in, before that it would be a bit of a mess spread over all the architectures.