Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp841237rdb; Fri, 23 Feb 2024 01:21:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVMvARgsyM4yC7t4LsEis2MO2TeiwtBlaxFb8ZCjzEb52T1iOx7yHPF2f/x3TQ2GTTI8CZFa8dTpAwGQumN08ACTTOB/UBmfvyKw5nV6g== X-Google-Smtp-Source: AGHT+IEZ3kyiSxYwySNB53HxapK53kx1/xFPoM6nWC0RY5lUt3lUrhTMZN17YBOuNn83d3XqW2Xn X-Received: by 2002:a05:6402:288:b0:563:d32f:5449 with SMTP id l8-20020a056402028800b00563d32f5449mr665440edv.24.1708680090556; Fri, 23 Feb 2024 01:21:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708680090; cv=pass; d=google.com; s=arc-20160816; b=K1BxgUrixWVowfgz90eHx8Vok6ZV/oipIxzd8xaH1aMtmU5Pke1j2mMH21teGFpjOd mTjotCEi4efXNB4hegln/l+fVouFJnjh3G28eblunqY8UuM6UejaZKku0C48hkuSM8rg y3MOZQUa+QsKZSGmNCslwP+7bBFVPMSZ+BLAzeSy4VNM5cvSHnDPZWV7TWfcFCWpJ+7n QtJPtn5vCkkYTB9xQgPfGTLBUxrI/rUaHzkUUA1GzdZlN22ay4ZO+NmkDGip0YxdRVmh 1l3qIFPhp2mXfVzkH3KoAHudi8xIGbTQXFNMNN10jxrZINyRrgcc8poKnunLJZTLAztP n1uA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fZw/7FWIZCP3rlrNit4Cu4sOKIBy8Icb2/Ch7C+m1dM=; fh=53+64VwP8ShR6PPcaLrYgvfdflD7HJKdK1RtUncFka8=; b=bjIMUXGLi0w2shNtmREeb5PlDJEGcONVlPAOj53iEDqG6eolKBO5sWaIwZGlsjlkoT WS9CSOHZ9TKnz0lWGUr4OiTAem4rDPF7iJeeC/vR9dVPmrfzeb8803IIBOZ9cnK7Ea+L GF+cFR2IMCdnytGpO1mKR7HTtYdRzcXgA7BbUNb7GRvQuloxTC4zVS57WHGhZ+vGW19N 5I066Pa4NGm4geKK2VVz4T9C1lQvNN8Yi+uxVO0fPNpX6zw5H0R8JEiWJ3ftCdakOQn6 Yv7h8NJT1SQZGXpcJ9/MMQk0IvzKB7ZGN/bKd+l+1O5f2mYDinu1g9ycl6qLHaGNK7Ue 5Nnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EFbTSIFQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-77892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77892-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f8-20020a50ee88000000b00564e0241cd6si2584883edr.341.2024.02.23.01.21.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EFbTSIFQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-77892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77892-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A51761F23A75 for ; Fri, 23 Feb 2024 08:03:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD557171AE; Fri, 23 Feb 2024 08:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EFbTSIFQ" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FCD24414; Fri, 23 Feb 2024 08:03:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708675420; cv=none; b=PwpelitrvtNkBB5TeEHb8f3Ys/K3YUcCxL4INrDUrNHw+PcaJaBOcF4BEAQw0YRJYtNyWXdhUwJc7mKZKB8uOrposY/ffScfLkAW8IAwnx/771ZcE3Rlwo9d5Lv214bqGfYLWl7rYr8W4ZwkfZbRqBYudd+c8cXq+fNSfrBOL/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708675420; c=relaxed/simple; bh=KrdAbu7vFuDAxh60xIAq4DCNIP7bmUzOzIQZIfJxERs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k07VmA+56pLW/dKKnPlvW6gyzUsytBpGpwcS+tqjJbNYkwmyP4CJnpapLfXO9bXOuYCGEsetyNIYyRWrp7mE+K+L7P0yawdQwCYHhKqcIHALds5nHIvfHeD8Ym7mGtx5woGNjD3SZtmJwr2xUCSSJuQvRwdVX14ien+rXAy8bq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=EFbTSIFQ; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org 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=fZw/7FWIZCP3rlrNit4Cu4sOKIBy8Icb2/Ch7C+m1dM=; b=EFbTSIFQQhE4pz/GyRHpok3GRo n6sfnPliTKOzk23Rpg+/0osKCzLlzZu5Sgjzz9C5sj06/0QX83bIOZ7jM+iRvlCd6YaYVci2DBH/3 eSblmbW2ih9igDH4//EVBA8BAYoR9KvrswvA3gj+eDP5VldjQ9FRjpm6pFqYacKCfv6nhNabcr/rp z6neL60IpJkoz8k0apRGsSUuaxWf+IhMqgHYfzpuGsitOnbBiegegIMeQhXBq98ECyRk9qW+u4gnb aqDrGCpCmh1Vg0xaY1RVXxZEKpFUNLdBEFRqV91qVNtjjQoogNH2rtQ41EP31PMMTknBeJYd8Baut NNTK0XbA==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdQWL-00000008OyF-3mql; Fri, 23 Feb 2024 08:03:01 +0000 Date: Fri, 23 Feb 2024 00:03:01 -0800 From: Christoph Hellwig To: "Michael S. Tsirkin" Cc: Christoph Hellwig , Maxime Coquelin , jasowang@redhat.com, xuanzhuo@linux.alibaba.com, xieyongji@bytedance.com, axboe@kernel.dk, gregkh@linuxfoundation.org, brauner@kernel.org, lstoakes@gmail.com, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, david.marchand@redhat.com Subject: Re: [PATCH] vduse: implement DMA sync callbacks Message-ID: References: <20240219170606.587290-1-maxime.coquelin@redhat.com> <20240222152541-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240222152541-mutt-send-email-mst@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Thu, Feb 22, 2024 at 03:29:10PM -0500, Michael S. Tsirkin wrote: > In a sense ... but on the other hand, the "fake DMA" metaphor seems to > work surprisingly well, like in this instance - internal bounce buffer > looks a bit like non-coherent DMA. A way to make this all prettier > would I guess be to actually wrap all of DMA with virtio wrappers which > would all go if () dma_... else vduse_...; or something to this end. A > lot of work for sure, and is it really worth it? if the only crazy > driver is vduse I'd maybe rather keep the crazy hacks local there ... Well, vduse is the only driver that does this hack - we had a few more and we got rid of it. It basically is the only thing preventing us from doing direct calls into the iommu code and compile out dma_ops entirely for non-Xen builds on the common architectures. So yes, I'd really like to see it gone rather sooner than later.