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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 1D469C433F5 for ; Mon, 10 Jan 2022 15:09:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A8C3440911; Mon, 10 Jan 2022 15:09:53 +0000 (UTC) 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 ybx2bMkSiksd; Mon, 10 Jan 2022 15:09:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 73733408D9; Mon, 10 Jan 2022 15:09:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 44342C002F; Mon, 10 Jan 2022 15:09:52 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4D50CC001E for ; Mon, 10 Jan 2022 15:09:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 24667403AC for ; Mon, 10 Jan 2022 15:09:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 99JHTvTjbEK3 for ; Mon, 10 Jan 2022 15:09:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 483C4400B9 for ; Mon, 10 Jan 2022 15:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641827388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=CXuvenrwHx7YFnqzXVsm1zs5IrujfFoKwnLPZtCn290rjpP6Vt/ZtRYhUbotBED2yHgloL m3PjQH6kI3jiNUoqb6z+kikNcxXJ5bV0+lzWdeZkknqhuFpW5Zzl51KPXgFxQ3t1tYm5ZX /gWcLVBsSmwfx69WJXqj/vzD+AbY7WE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-NpxM4G_9NV6vWHjkZx2eng-1; Mon, 10 Jan 2022 10:09:46 -0500 X-MC-Unique: NpxM4G_9NV6vWHjkZx2eng-1 Received: by mail-wm1-f72.google.com with SMTP id m15-20020a7bce0f000000b003473d477618so6525553wmc.8 for ; Mon, 10 Jan 2022 07:09:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=PH+YYaypdtfn6QWhKsAX94Haf0XM2Rdy6/wsHLteQywZV5Nt5VwskjmzCRibyLTBuP pUFpYwPMqm2gt3JbjBA6+nRGecrH6gqVEZQx9j7Lskdr1SQqao4h5oheBlZytjmV5ov5 ZfKP3jMl4lr9CY7bLe6TvKFtw0ZOikRwTRltLv7CzM2cZjNo1Ee2pE5tZD4CqgIjhjHz fxLDwXCcyci0S55cm6REJWGICr8AWxKiHD50TqWAs/Slj9x86alwFmgE5oqTVzc8JqIy nFy6u/cHepGWMOK8MkTety083D9r6n27YVhdwxgaJ2l7PXrJry6ugkd7hMcxl4C4Knaj ZLRA== X-Gm-Message-State: AOAM531UhUeFimRPvYXwH7A43CpS0mQN4SF1M5tY8048/6880IVPHD5M pbpddrdqmzQgvINaMYEAqtN+nkU3o6WwN239ngIPEUvokAxqI1+JU2PJo1WprwytT3/23x8ArIV wwWmDtzzcheZ7aTMETjT0rnp1KMOu/g== X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92694wrd.234.1641827384692; Mon, 10 Jan 2022 07:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+Wi7ut3xNdrf+rI6tR7FUH1Wzlso2Na/Gkg81RELF3PPjhams/SaDbGDnPVE94lb71Siqrw== X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92655wrd.234.1641827384391; Mon, 10 Jan 2022 07:09:44 -0800 (PST) Received: from redhat.com ([2.55.148.228]) by smtp.gmail.com with ESMTPSA id m6sm7888102wrx.36.2022.01.10.07.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 07:09:43 -0800 (PST) Date: Mon, 10 Jan 2022 10:09:38 -0500 From: "Michael S. Tsirkin" To: Yongji Xie Subject: Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace Message-ID: <20220110100911-mutt-send-email-mst@kernel.org> References: <20210830141737.181-1-xieyongji@bytedance.com> <20220110075546-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: kvm , Jason Wang , virtualization , Christian Brauner , Will Deacon , Jonathan Corbet , Matthew Wilcox , Christoph Hellwig , Dan Carpenter , Stefano Garzarella , Liu Xiaodong , linux-fsdevel@vger.kernel.org, Al Viro , Stefan Hajnoczi , songmuchun@bytedance.com, Jens Axboe , He Zhe , Greg KH , Randy Dunlap , linux-kernel , iommu@lists.linux-foundation.org, bcrl@kvack.org, Netdev , Joe Perches , Robin Murphy , Mika =?iso-8859-1?Q?Penttil=E4?= X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, Jan 10, 2022 at 09:54:08PM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 8:57 PM Michael S. Tsirkin wrote: > > > > On Mon, Aug 30, 2021 at 10:17:24PM +0800, Xie Yongji wrote: > > > This series introduces a framework that makes it possible to implement > > > software-emulated vDPA devices in userspace. And to make the device > > > emulation more secure, the emulated vDPA device's control path is handled > > > in the kernel and only the data path is implemented in the userspace. > > > > > > Since the emuldated vDPA device's control path is handled in the kernel, > > > a message mechnism is introduced to make userspace be aware of the data > > > path related changes. Userspace can use read()/write() to receive/reply > > > the control messages. > > > > > > In the data path, the core is mapping dma buffer into VDUSE daemon's > > > address space, which can be implemented in different ways depending on > > > the vdpa bus to which the vDPA device is attached. > > > > > > In virtio-vdpa case, we implements a MMU-based software IOTLB with > > > bounce-buffering mechanism to achieve that. And in vhost-vdpa case, the dma > > > buffer is reside in a userspace memory region which can be shared to the > > > VDUSE userspace processs via transferring the shmfd. > > > > > > The details and our user case is shown below: > > > > > > ------------------------ ------------------------- ---------------------------------------------- > > > | Container | | QEMU(VM) | | VDUSE daemon | > > > | --------- | | ------------------- | | ------------------------- ---------------- | > > > | |dev/vdx| | | |/dev/vhost-vdpa-x| | | | vDPA device emulation | | block driver | | > > > ------------+----------- -----------+------------ -------------+----------------------+--------- > > > | | | | > > > | | | | > > > ------------+---------------------------+----------------------------+----------------------+--------- > > > | | block device | | vhost device | | vduse driver | | TCP/IP | | > > > | -------+-------- --------+-------- -------+-------- -----+---- | > > > | | | | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio-blk driver | | vhost-vdpa driver | | vdpa device | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio bus | | | | > > > | --------+----+----------- | | | | > > > | | | | | | > > > | ----------+---------- | | | | > > > | | virtio-blk device | | | | | > > > | ----------+---------- | | | | > > > | | | | | | > > > | -----------+----------- | | | | > > > | | virtio-vdpa driver | | | | | > > > | -----------+----------- | | | | > > > | | | | vdpa bus | | > > > | -----------+----------------------+---------------------------+------------ | | > > > | ---+--- | > > > -----------------------------------------------------------------------------------------| NIC |------ > > > ---+--- > > > | > > > ---------+--------- > > > | Remote Storages | > > > ------------------- > > > > > > We make use of it to implement a block device connecting to > > > our distributed storage, which can be used both in containers and > > > VMs. Thus, we can have an unified technology stack in this two cases. > > > > > > To test it with null-blk: > > > > > > $ qemu-storage-daemon \ > > > --chardev socket,id=charmonitor,path=/tmp/qmp.sock,server,nowait \ > > > --monitor chardev=charmonitor \ > > > --blockdev driver=host_device,cache.direct=on,aio=native,filename=/dev/nullb0,node-name=disk0 \ > > > --export type=vduse-blk,id=test,node-name=disk0,writable=on,name=vduse-null,num-queues=16,queue-size=128 > > > > > > The qemu-storage-daemon can be found at https://github.com/bytedance/qemu/tree/vduse > > > > It's been half a year - any plans to upstream this? > > Yeah, this is on my to-do list this month. > > Sorry for taking so long... I've been working on another project > enabling userspace RDMA with VDUSE for the past few months. So I > didn't have much time for this. Anyway, I will submit the first > version as soon as possible. > > Thanks, > Yongji Oh fun. You mean like virtio-rdma? Or RDMA as a backend for regular virtio? -- MST _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 EBC48C433EF for ; Mon, 10 Jan 2022 15:09:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 95D7B60C06; Mon, 10 Jan 2022 15:09:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jjtuM9Y2demw; Mon, 10 Jan 2022 15:09:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0ABA160D61; Mon, 10 Jan 2022 15:09:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 77259C001E; Mon, 10 Jan 2022 15:09:52 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55E1FC002F for ; Mon, 10 Jan 2022 15:09:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2EDE88258A for ; Mon, 10 Jan 2022 15:09:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com 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 4LG4473HVBdG for ; Mon, 10 Jan 2022 15:09:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 362AD82553 for ; Mon, 10 Jan 2022 15:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641827388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=CXuvenrwHx7YFnqzXVsm1zs5IrujfFoKwnLPZtCn290rjpP6Vt/ZtRYhUbotBED2yHgloL m3PjQH6kI3jiNUoqb6z+kikNcxXJ5bV0+lzWdeZkknqhuFpW5Zzl51KPXgFxQ3t1tYm5ZX /gWcLVBsSmwfx69WJXqj/vzD+AbY7WE= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-5srqVL_-NYC5Q6ECfueZfA-1; Mon, 10 Jan 2022 10:09:45 -0500 X-MC-Unique: 5srqVL_-NYC5Q6ECfueZfA-1 Received: by mail-wm1-f70.google.com with SMTP id l20-20020a05600c1d1400b003458e02cea0so9047432wms.7 for ; Mon, 10 Jan 2022 07:09:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=1g8/Ap2jgSUVpLMDBvMY6JyqvT3VlzLsIbmYGfzvst8rVaJZwD1+uHjIkPyMDbYWOk lFoC/ZcyjcNyNlbzPR27xRAEyjEC9329pLk0ckuJ2Fo3zlG/lHgbxFkLG5iNAIDKBZJg +JD+aV60VQv86xkbwqT43PZQlvlCF8pcZMlNehdO9ieVsx8fOcl6FYF3FAU6GzC6Jb41 oYwlZAykdT+khMM/loqAZ9Vy6dSWP0U7b0FiPCERiA04YO95mRPRGKDYSrxlePinn+p/ b41zZRcHw+K/WbBmeBUUaXL+MjQUMkUxhAu1yaphnsg6f9bufUBoH+igcth1uu9sJvuH HkRg== X-Gm-Message-State: AOAM532p9x8op6qpIYrOAYXT6e4Apcte62SF8ChZh6Bq2vmxg/RQ87Tg TVsTSoNcgXMB2tZeB1W7zSaNXcbfzIO+Bd2wiwrCLPUHCmONKppbpuOZMzT3BYKDldsjy7lXG7t +uUCD3GZbH/s17Mb4YF5prIND/KptdC8kTfNp4zt/IA== X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92679wrd.234.1641827384665; Mon, 10 Jan 2022 07:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+Wi7ut3xNdrf+rI6tR7FUH1Wzlso2Na/Gkg81RELF3PPjhams/SaDbGDnPVE94lb71Siqrw== X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92655wrd.234.1641827384391; Mon, 10 Jan 2022 07:09:44 -0800 (PST) Received: from redhat.com ([2.55.148.228]) by smtp.gmail.com with ESMTPSA id m6sm7888102wrx.36.2022.01.10.07.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 07:09:43 -0800 (PST) Date: Mon, 10 Jan 2022 10:09:38 -0500 From: "Michael S. Tsirkin" To: Yongji Xie Subject: Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace Message-ID: <20220110100911-mutt-send-email-mst@kernel.org> References: <20210830141737.181-1-xieyongji@bytedance.com> <20220110075546-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: kvm , virtualization , Christian Brauner , Will Deacon , Jonathan Corbet , joro@8bytes.org, Matthew Wilcox , Christoph Hellwig , Dan Carpenter , John Garry , Liu Xiaodong , linux-fsdevel@vger.kernel.org, Al Viro , Stefan Hajnoczi , songmuchun@bytedance.com, Jens Axboe , He Zhe , Greg KH , Randy Dunlap , linux-kernel , iommu@lists.linux-foundation.org, bcrl@kvack.org, Netdev , Joe Perches , Robin Murphy , Mika =?iso-8859-1?Q?Penttil=E4?= 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" On Mon, Jan 10, 2022 at 09:54:08PM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 8:57 PM Michael S. Tsirkin wrote: > > > > On Mon, Aug 30, 2021 at 10:17:24PM +0800, Xie Yongji wrote: > > > This series introduces a framework that makes it possible to implement > > > software-emulated vDPA devices in userspace. And to make the device > > > emulation more secure, the emulated vDPA device's control path is handled > > > in the kernel and only the data path is implemented in the userspace. > > > > > > Since the emuldated vDPA device's control path is handled in the kernel, > > > a message mechnism is introduced to make userspace be aware of the data > > > path related changes. Userspace can use read()/write() to receive/reply > > > the control messages. > > > > > > In the data path, the core is mapping dma buffer into VDUSE daemon's > > > address space, which can be implemented in different ways depending on > > > the vdpa bus to which the vDPA device is attached. > > > > > > In virtio-vdpa case, we implements a MMU-based software IOTLB with > > > bounce-buffering mechanism to achieve that. And in vhost-vdpa case, the dma > > > buffer is reside in a userspace memory region which can be shared to the > > > VDUSE userspace processs via transferring the shmfd. > > > > > > The details and our user case is shown below: > > > > > > ------------------------ ------------------------- ---------------------------------------------- > > > | Container | | QEMU(VM) | | VDUSE daemon | > > > | --------- | | ------------------- | | ------------------------- ---------------- | > > > | |dev/vdx| | | |/dev/vhost-vdpa-x| | | | vDPA device emulation | | block driver | | > > > ------------+----------- -----------+------------ -------------+----------------------+--------- > > > | | | | > > > | | | | > > > ------------+---------------------------+----------------------------+----------------------+--------- > > > | | block device | | vhost device | | vduse driver | | TCP/IP | | > > > | -------+-------- --------+-------- -------+-------- -----+---- | > > > | | | | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio-blk driver | | vhost-vdpa driver | | vdpa device | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio bus | | | | > > > | --------+----+----------- | | | | > > > | | | | | | > > > | ----------+---------- | | | | > > > | | virtio-blk device | | | | | > > > | ----------+---------- | | | | > > > | | | | | | > > > | -----------+----------- | | | | > > > | | virtio-vdpa driver | | | | | > > > | -----------+----------- | | | | > > > | | | | vdpa bus | | > > > | -----------+----------------------+---------------------------+------------ | | > > > | ---+--- | > > > -----------------------------------------------------------------------------------------| NIC |------ > > > ---+--- > > > | > > > ---------+--------- > > > | Remote Storages | > > > ------------------- > > > > > > We make use of it to implement a block device connecting to > > > our distributed storage, which can be used both in containers and > > > VMs. Thus, we can have an unified technology stack in this two cases. > > > > > > To test it with null-blk: > > > > > > $ qemu-storage-daemon \ > > > --chardev socket,id=charmonitor,path=/tmp/qmp.sock,server,nowait \ > > > --monitor chardev=charmonitor \ > > > --blockdev driver=host_device,cache.direct=on,aio=native,filename=/dev/nullb0,node-name=disk0 \ > > > --export type=vduse-blk,id=test,node-name=disk0,writable=on,name=vduse-null,num-queues=16,queue-size=128 > > > > > > The qemu-storage-daemon can be found at https://github.com/bytedance/qemu/tree/vduse > > > > It's been half a year - any plans to upstream this? > > Yeah, this is on my to-do list this month. > > Sorry for taking so long... I've been working on another project > enabling userspace RDMA with VDUSE for the past few months. So I > didn't have much time for this. Anyway, I will submit the first > version as soon as possible. > > Thanks, > Yongji Oh fun. You mean like virtio-rdma? Or RDMA as a backend for regular virtio? -- MST _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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 24DB4C433FE for ; Mon, 10 Jan 2022 15:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235915AbiAJPJs (ORCPT ); Mon, 10 Jan 2022 10:09:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:32076 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235916AbiAJPJr (ORCPT ); Mon, 10 Jan 2022 10:09:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641827387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=FCKL11GeK8lPcrJxi1b6tEdLWm46ya5nKM7YFb8Z9sWP3uxjCqZ/mNgbCnPlkDJgcTKVWb Nuto2Wr73jlMPi8sZjr0u5SIjjpAomCwya82EPufuvKsRJVXeeNI7cK44TPp6ZY7zPUFZ2 +oW1ZO1Vr+a9A68346t8gyfFPjz5yUw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-Zt8BqPMTPQ-6NqPUw6LlpQ-1; Mon, 10 Jan 2022 10:09:45 -0500 X-MC-Unique: Zt8BqPMTPQ-6NqPUw6LlpQ-1 Received: by mail-wr1-f71.google.com with SMTP id i23-20020adfaad7000000b001a6320b66b9so2398575wrc.15 for ; Mon, 10 Jan 2022 07:09:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pqCR8DvhBxiCC4TzGlm/t/7v2g7znFq4gFV1cmWoEXc=; b=r0TB4gkSgFtr6mhB19wYAqkp8fXkZDV5BPhCMdsskG5SG8IFatZ10asfyGm6KEd4NJ kBXVZfIaWvYOUchC5tdEQoCDX88K6NJJ6WXG5D90N6x2i5aRzYccMaQLulD3mm13eO3Y 5RAHDMdgbCvizQJgw8CS/7WynOznEne1FaF7xQEhE8Hj8PNZHD+B0W63XB5096vSbIr5 piIeJ/kyw7iGYS3K1SDXmfchPTdHApUsCJyY1G5+WRMEAlQcjRFzheguSibBvlwCosit dtB3l8y90810bAnqsmb6oN0GGygrqjzt+j2xt2mGvFr576ixnCXs+ZglgZyBOkQ48L02 6Epw== X-Gm-Message-State: AOAM531FtyK8QEvNTiJ9Ih84527cUGwiC+1fJAzIjIqtc+CsMb/57xc5 zIjCgp68eOXvBcXLfXEgwl0hiZNAEavYIvL4IHb6iHcLc/41U8fKwWLzKOqChdo58CQfHkAmc6e l0D+p3fD0aFVh X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92692wrd.234.1641827384680; Mon, 10 Jan 2022 07:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+Wi7ut3xNdrf+rI6tR7FUH1Wzlso2Na/Gkg81RELF3PPjhams/SaDbGDnPVE94lb71Siqrw== X-Received: by 2002:a05:6000:1687:: with SMTP id y7mr92655wrd.234.1641827384391; Mon, 10 Jan 2022 07:09:44 -0800 (PST) Received: from redhat.com ([2.55.148.228]) by smtp.gmail.com with ESMTPSA id m6sm7888102wrx.36.2022.01.10.07.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 07:09:43 -0800 (PST) Date: Mon, 10 Jan 2022 10:09:38 -0500 From: "Michael S. Tsirkin" To: Yongji Xie Cc: Jason Wang , Stefan Hajnoczi , Stefano Garzarella , Parav Pandit , Christoph Hellwig , Christian Brauner , Randy Dunlap , Matthew Wilcox , Al Viro , Jens Axboe , bcrl@kvack.org, Jonathan Corbet , Mika =?iso-8859-1?Q?Penttil=E4?= , Dan Carpenter , joro@8bytes.org, Greg KH , He Zhe , Liu Xiaodong , Joe Perches , Robin Murphy , Will Deacon , John Garry , songmuchun@bytedance.com, virtualization , Netdev , kvm , linux-fsdevel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel Subject: Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace Message-ID: <20220110100911-mutt-send-email-mst@kernel.org> References: <20210830141737.181-1-xieyongji@bytedance.com> <20220110075546-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jan 10, 2022 at 09:54:08PM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 8:57 PM Michael S. Tsirkin wrote: > > > > On Mon, Aug 30, 2021 at 10:17:24PM +0800, Xie Yongji wrote: > > > This series introduces a framework that makes it possible to implement > > > software-emulated vDPA devices in userspace. And to make the device > > > emulation more secure, the emulated vDPA device's control path is handled > > > in the kernel and only the data path is implemented in the userspace. > > > > > > Since the emuldated vDPA device's control path is handled in the kernel, > > > a message mechnism is introduced to make userspace be aware of the data > > > path related changes. Userspace can use read()/write() to receive/reply > > > the control messages. > > > > > > In the data path, the core is mapping dma buffer into VDUSE daemon's > > > address space, which can be implemented in different ways depending on > > > the vdpa bus to which the vDPA device is attached. > > > > > > In virtio-vdpa case, we implements a MMU-based software IOTLB with > > > bounce-buffering mechanism to achieve that. And in vhost-vdpa case, the dma > > > buffer is reside in a userspace memory region which can be shared to the > > > VDUSE userspace processs via transferring the shmfd. > > > > > > The details and our user case is shown below: > > > > > > ------------------------ ------------------------- ---------------------------------------------- > > > | Container | | QEMU(VM) | | VDUSE daemon | > > > | --------- | | ------------------- | | ------------------------- ---------------- | > > > | |dev/vdx| | | |/dev/vhost-vdpa-x| | | | vDPA device emulation | | block driver | | > > > ------------+----------- -----------+------------ -------------+----------------------+--------- > > > | | | | > > > | | | | > > > ------------+---------------------------+----------------------------+----------------------+--------- > > > | | block device | | vhost device | | vduse driver | | TCP/IP | | > > > | -------+-------- --------+-------- -------+-------- -----+---- | > > > | | | | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio-blk driver | | vhost-vdpa driver | | vdpa device | | | > > > | ----------+---------- ----------+----------- -------+------- | | > > > | | virtio bus | | | | > > > | --------+----+----------- | | | | > > > | | | | | | > > > | ----------+---------- | | | | > > > | | virtio-blk device | | | | | > > > | ----------+---------- | | | | > > > | | | | | | > > > | -----------+----------- | | | | > > > | | virtio-vdpa driver | | | | | > > > | -----------+----------- | | | | > > > | | | | vdpa bus | | > > > | -----------+----------------------+---------------------------+------------ | | > > > | ---+--- | > > > -----------------------------------------------------------------------------------------| NIC |------ > > > ---+--- > > > | > > > ---------+--------- > > > | Remote Storages | > > > ------------------- > > > > > > We make use of it to implement a block device connecting to > > > our distributed storage, which can be used both in containers and > > > VMs. Thus, we can have an unified technology stack in this two cases. > > > > > > To test it with null-blk: > > > > > > $ qemu-storage-daemon \ > > > --chardev socket,id=charmonitor,path=/tmp/qmp.sock,server,nowait \ > > > --monitor chardev=charmonitor \ > > > --blockdev driver=host_device,cache.direct=on,aio=native,filename=/dev/nullb0,node-name=disk0 \ > > > --export type=vduse-blk,id=test,node-name=disk0,writable=on,name=vduse-null,num-queues=16,queue-size=128 > > > > > > The qemu-storage-daemon can be found at https://github.com/bytedance/qemu/tree/vduse > > > > It's been half a year - any plans to upstream this? > > Yeah, this is on my to-do list this month. > > Sorry for taking so long... I've been working on another project > enabling userspace RDMA with VDUSE for the past few months. So I > didn't have much time for this. Anyway, I will submit the first > version as soon as possible. > > Thanks, > Yongji Oh fun. You mean like virtio-rdma? Or RDMA as a backend for regular virtio? -- MST