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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53C74C77B73 for ; Mon, 1 May 2023 04:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230347AbjEAEZE (ORCPT ); Mon, 1 May 2023 00:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjEAEZD (ORCPT ); Mon, 1 May 2023 00:25:03 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3144191; Sun, 30 Apr 2023 21:25:01 -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=0YL/opZmy6D0wjx7A8o7ZcsEGCKfXNZJ75ginpuSzuw=; b=Y7nL4ulLqm1u2O5DHyEVGk2KE1 V0WIAEzeJCx+NCsEzIfdJBY6mTo0ysz+ebtV/5UuhKLnsdm9Km75Ikft9XAAF0YnKVtnTnPBI7IgV 9LV0OEUecPd4Y6TXU34DmgU96BgX7im+NXHkYbBE/zCjfP2QVK2MxF8Ocu3SWj0Psk1jWVQbBnEja vuWTyC3vkiHr3lzxqQdIKCWyrNEHs2ah9m31KEaaZsdVKo7CW8YbKyAs4BmtCpfAY2cGWsdYJ9H44 FGZg3QY3d6THw4r5+u6OadhB/l+XRwW+6oUGQqJg4fx+cuk56Cg1iX67z9yNw6P5PIsZnIQVBS7o7 MUeediDg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ptL5o-00FECq-2k; Mon, 01 May 2023 04:24:52 +0000 Date: Sun, 30 Apr 2023 21:24:52 -0700 From: Christoph Hellwig To: Xuan Zhuo Cc: virtualization@lists.linux-foundation.org, "Michael S. Tsirkin" , Jason Wang , Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org, Christoph Hellwig , Jakub Kicinski , Alexander Lobakin Subject: Re: [PATCH vhost v7 01/11] virtio_ring: split: separate dma codes Message-ID: References: <20230425073613.8839-1-xuanzhuo@linux.alibaba.com> <20230425073613.8839-2-xuanzhuo@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230425073613.8839-2-xuanzhuo@linux.alibaba.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org > +static dma_addr_t vring_sg_address(struct scatterlist *sg) > +{ > + if (sg->dma_address) > + return sg->dma_address; 0 is a perfectly valid DMA address. So I have no idea how this is even supposed to work. 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAE49C77B73 for ; Mon, 1 May 2023 04:24:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 440C981EAC; Mon, 1 May 2023 04:24:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 440C981EAC Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Y7nL4ulL X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dmdimTg0isjc; Mon, 1 May 2023 04:24:57 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id A0EA381F99; Mon, 1 May 2023 04:24:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A0EA381F99 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7795CC0036; Mon, 1 May 2023 04:24:56 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8FF74C002A for ; Mon, 1 May 2023 04:24:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5BD0C40905 for ; Mon, 1 May 2023 04:24:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5BD0C40905 Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Y7nL4ulL X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8xc-BB57vLjV for ; Mon, 1 May 2023 04:24:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A3A1140903 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by smtp4.osuosl.org (Postfix) with ESMTPS id A3A1140903 for ; Mon, 1 May 2023 04:24:53 +0000 (UTC) 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=0YL/opZmy6D0wjx7A8o7ZcsEGCKfXNZJ75ginpuSzuw=; b=Y7nL4ulLqm1u2O5DHyEVGk2KE1 V0WIAEzeJCx+NCsEzIfdJBY6mTo0ysz+ebtV/5UuhKLnsdm9Km75Ikft9XAAF0YnKVtnTnPBI7IgV 9LV0OEUecPd4Y6TXU34DmgU96BgX7im+NXHkYbBE/zCjfP2QVK2MxF8Ocu3SWj0Psk1jWVQbBnEja vuWTyC3vkiHr3lzxqQdIKCWyrNEHs2ah9m31KEaaZsdVKo7CW8YbKyAs4BmtCpfAY2cGWsdYJ9H44 FGZg3QY3d6THw4r5+u6OadhB/l+XRwW+6oUGQqJg4fx+cuk56Cg1iX67z9yNw6P5PIsZnIQVBS7o7 MUeediDg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ptL5o-00FECq-2k; Mon, 01 May 2023 04:24:52 +0000 Date: Sun, 30 Apr 2023 21:24:52 -0700 From: Christoph Hellwig To: Xuan Zhuo Subject: Re: [PATCH vhost v7 01/11] virtio_ring: split: separate dma codes Message-ID: References: <20230425073613.8839-1-xuanzhuo@linux.alibaba.com> <20230425073613.8839-2-xuanzhuo@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230425073613.8839-2-xuanzhuo@linux.alibaba.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Cc: Jesper Dangaard Brouer , Daniel Borkmann , "Michael S. Tsirkin" , netdev@vger.kernel.org, John Fastabend , Alexei Starovoitov , virtualization@lists.linux-foundation.org, Christoph Hellwig , Alexander Lobakin , Jakub Kicinski , bpf@vger.kernel.org, "David S. Miller" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" > +static dma_addr_t vring_sg_address(struct scatterlist *sg) > +{ > + if (sg->dma_address) > + return sg->dma_address; 0 is a perfectly valid DMA address. So I have no idea how this is even supposed to work. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization