Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp83259pxv; Wed, 30 Jun 2021 00:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLjPW8mu8sTKdaBwxj8vucwe8H1rfV0MGe11QjP/UmrRfOIYfFsFxOdfqTwadtszJNaEqv X-Received: by 2002:a5d:914f:: with SMTP id y15mr6920660ioq.196.1625036957470; Wed, 30 Jun 2021 00:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625036957; cv=none; d=google.com; s=arc-20160816; b=tG4eCz8/9ekdcce6qIW6WM5rrsGQn63RbRb7Z40oqf/6YSJPVgZ5CACKP4+nhzlwos KucGr1tW4M3nnmzUWkpNwWrK5Jr3Cp6Xab9EZzjjihk9SsLiiSfa11DdcxJ+4Bz3Y2em E+uE/siqC2tqQlNoJxL+ZjjkxFLzYjFk4ObzBnZPAk25DoVS6ye4XbXbVZ7UhGiLcz9U RZ89cErV5GORCmq52MVDieBVULs2fMiv/GG4d3tFJgVy29vQ5P+BKRX00mbZfeXPiaeX Z4xjuHlOg0DpkWIfueIM0A2IZ5jkj3YBvaQ+9F7/3/7gDiBAM6h1rXiayI4sDJ2n2+EP AUjg== 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=dsmF65Hp+Uqc28Sl8LwGXWskjtwe7+DI92hwHXbQkFA=; b=YIAYo5qKs5l7/8Rsfco17BxpY1nSdixUTxxzOBKsdxFdOs1zG/1cCitsOfEVgNYTGY 4x7Gqw6JbhV6P3XTy0QskUTz7A5J6bzoti4OOJZRbVlwcWjPvDVAhTVpBgkXBbE0FZRb hipvRYmYCOjVV6uI1XtgBBx3OQ6gkFT1S5o0NlMhDc35lCKoJuyiGhXPNjyzvi42cXps OLoOxTh9/OFKW2/ltQ9xXleYS4FHKpKDk4Z4RjTOxYBnCWGF0EsPmMsIsiyxoVf4brru OGGRb0b/xwpvdupX1j4AaJpJTCwEiOOxx+57/8gv1BjL1RBjrRUMNttg8QdCG0Tp93d+ cX9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=GIxFrLBh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si23036756jaj.52.2021.06.30.00.09.05; Wed, 30 Jun 2021 00:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=GIxFrLBh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232714AbhF3HJK (ORCPT + 99 others); Wed, 30 Jun 2021 03:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbhF3HJJ (ORCPT ); Wed, 30 Jun 2021 03:09:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947D4C061766; Wed, 30 Jun 2021 00:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=dsmF65Hp+Uqc28Sl8LwGXWskjtwe7+DI92hwHXbQkFA=; b=GIxFrLBhO6vSrFlIovAS3oKhAk 2Lz/EWmV4MXClGxqw8kfRDKlmi2GtdV0uLz8GInzsTYbp/j6OaWyhAKVo1eo4a9b8H2/k56EKbDvV y2GtJ+TR5lnwszsDINs9HafiqdqlixqmpVUDT5RFgxU2QLLv+/cho+grL+1Vc0g8+2/SlnePBKOG7 OLho8hViHIYAx4TUPolbnmtBlBALFzfpGJ4VyBleE5rlmpssM7wYM8+dhx4YMPSsVXI8Z8G2kF82i JQuions/tMg957LyjA2UxTSvzyqVxDMuHCys225WIfNum1nPw/BR1E6gHvktOeYDO7jdCSD6Jd991 piooUF5A==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyUI0-0051Ka-BD; Wed, 30 Jun 2021 07:05:46 +0000 Date: Wed, 30 Jun 2021 08:05:40 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Jason Wang , Jean-Philippe Brucker , "Tian, Kevin" , "Jiang, Dave" , "Raj, Ashok" , "kvm@vger.kernel.org" , Jonathan Corbet , David Woodhouse , LKML , "iommu@lists.linux-foundation.org" , Alex Williamson , Kirti Wankhede , Robin Murphy , David Gibson Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: References: <20210602173510.GE1002214@nvidia.com> <20210602120111.5e5bcf93.alex.williamson@redhat.com> <20210602180925.GH1002214@nvidia.com> <20210602130053.615db578.alex.williamson@redhat.com> <20210602195404.GI1002214@nvidia.com> <20210602143734.72fb4fa4.alex.williamson@redhat.com> <6a9426d7-ed55-e006-9c4c-6b7c78142e39@redhat.com> <20210603130927.GZ1002214@nvidia.com> <65614634-1db4-7119-1a90-64ba5c6e9042@redhat.com> <20210604115805.GG1002214@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210604115805.GG1002214@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 04, 2021 at 08:58:05AM -0300, Jason Gunthorpe wrote: > On Fri, Jun 04, 2021 at 09:11:03AM +0800, Jason Wang wrote: > > > nor do any virtio drivers implement the required platform specific > > > cache flushing to make no-snoop TLPs work. > > > > I don't get why virtio drivers needs to do that. I think DMA API should hide > > those arch/platform specific stuffs from us. > > It is not arch/platform stuff. If the device uses no-snoop then a > very platform specific recovery is required in the device driver. Well, the proper way to support NO_SNOOP DMA would be to force the DMA API into supporting the device as if the platform was not DMA coherent, probably on a per-call basis. It is just that no one bothered to actually do the work an people just kept piling hacks over hacks.