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 X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1FFAC49EB7 for ; Mon, 28 Jun 2021 04:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C33F61C34 for ; Mon, 28 Jun 2021 04:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232141AbhF1Em5 (ORCPT ); Mon, 28 Jun 2021 00:42:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38883 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232134AbhF1Emy (ORCPT ); Mon, 28 Jun 2021 00:42:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624855229; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AHA+LCiynBinIcwBex84PZFjkFyKiA5ldfw47X4q5zo=; b=BM3l6mJbwMWJ5ITDrjOTFe6NrBUQ6Ui0nGLmzPdE+NXn+M7SjpPPgKhUDgwslOIUiV2x+d dTDZUKAgkB5w3t8OHywv7J8j0Dxfy2xTfceZxXWNO7l+Q9prhfdjQNPoWF08j5zwxnVHIw DR9CQzkr8S8d4Cut1kyTeKIRiRuNJjQ= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-FK7AHJVZMa6mJnakr741kA-1; Mon, 28 Jun 2021 00:40:24 -0400 X-MC-Unique: FK7AHJVZMa6mJnakr741kA-1 Received: by mail-pj1-f69.google.com with SMTP id om5-20020a17090b3a85b029016eb0b21f1dso11209290pjb.4 for ; Sun, 27 Jun 2021 21:40:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=AHA+LCiynBinIcwBex84PZFjkFyKiA5ldfw47X4q5zo=; b=fvh7JhhLA053rV172U8wnen/Fq4cjCFrX7fOiyG2+V5SX5KkE8RQwmgNqEdZ+/mg9q Oml2S+EJgPzWHOy6ObPXTZ0A2XEU7G4cuqcQXOZJpPb9aV+1qqK+pgRXCPfi1OjkNpIO roS6vvOCPa/3FgWviqIAnyn7ldFVGgxbj+dNAOwmpW824UMj0HAO6HMOsxK1FcCv0N3u ISjsOSKeXYnyISlGfClDT8GjaY8VqjgaXc25rpDLalz67QikhWmFNHxBg3wu4PPBZB2T 5VCERyUWI2q/wYIU4le+gt10ULs0uZ4bapQaiaddRkKekYiFbNl9ejQzIaDNf9yA2MN5 XE0g== X-Gm-Message-State: AOAM531xF+EFiUSwKMCfpIynRZ0VySoBYsSnPiHsdpuaFZwn1JmKjunS 3TXejSHrWmO9G4aABEd1iYy7+IIedcX3y4/Wu7CoVqRLf1+mtCWrXmEbvVZ1Yk4WV/Zlq1tXt/J Z+8PXh7WUlc0A1SrXmeapahMmXA== X-Received: by 2002:a17:90a:73ca:: with SMTP id n10mr35061279pjk.16.1624855223792; Sun, 27 Jun 2021 21:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo0o1s5KBYLlDLTqUhWl2FmmtFdw3BbxmCq5oGFB7ob0lz6rjRGdc+HVA7kjdSm4QccHUIRQ== X-Received: by 2002:a17:90a:73ca:: with SMTP id n10mr35061255pjk.16.1624855223625; Sun, 27 Jun 2021 21:40:23 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id x143sm12654203pfc.6.2021.06.27.21.40.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 21:40:23 -0700 (PDT) Subject: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace To: Yongji Xie Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , Stefano Garzarella , Parav Pandit , Christoph Hellwig , Christian Brauner , Randy Dunlap , Matthew Wilcox , Al Viro , Jens Axboe , bcrl@kvack.org, Jonathan Corbet , =?UTF-8?Q?Mika_Penttil=c3=a4?= , Dan Carpenter , joro@8bytes.org, Greg KH , songmuchun@bytedance.com, virtualization , netdev@vger.kernel.org, kvm , linux-fsdevel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel References: <20210615141331.407-1-xieyongji@bytedance.com> <20210615141331.407-10-xieyongji@bytedance.com> <1bba439f-ffc8-c20e-e8a4-ac73e890c592@redhat.com> <0aeb7cb7-58e5-1a95-d830-68edd7e8ec2e@redhat.com> <48cab125-093b-2299-ff9c-3de8c7c5ed3d@redhat.com> From: Jason Wang Message-ID: Date: Mon, 28 Jun 2021 12:40:14 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 在 2021/6/25 下午12:19, Yongji Xie 写道: >> 2b) for set_status(): simply relay the message to userspace, reply is no >> needed. Userspace will use a command to update the status when the >> datapath is stop. The the status could be fetched via get_stats(). >> >> 2b looks more spec complaint. >> > Looks good to me. And I think we can use the reply of the message to > update the status instead of introducing a new command. > Just notice this part in virtio_finalize_features():         virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);         status = dev->config->get_status(dev);         if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { So we no reply doesn't work for FEATURES_OK. So my understanding is: 1) We must not use noreply for set_status() 2) We can use noreply for get_status(), but it requires a new ioctl to update the status. So it looks to me we need synchronize for both get_status() and set_status(). Thanks