Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3182306pxv; Sun, 27 Jun 2021 21:44:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7mcHzZCJ2OKYgPSc0S1+A7cP66zE9J2cnrgPypT2/pbLnI8D9tM8yKPNtQu3s5JJwdiid X-Received: by 2002:a05:6402:31b4:: with SMTP id dj20mr30861486edb.186.1624855467821; Sun, 27 Jun 2021 21:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624855467; cv=none; d=google.com; s=arc-20160816; b=jxTA17zLkZuxrk/3+fPqkkkplnDdER1BLdJVf2/PECbuc6pavSb80ACrMYrm4cPa0W XgmKdjKUmSTIoub4sEsMqmHcSzbgRQUByqwlDC8LSd65wukbY0snfrAQQMAc47B/eErd FnMCu1f9oaBaDO6/GeI8yBT60H1hstBxRdZ4s1A/GxzTCs1S3CNUcvA60rDxJ0SuP8a6 bGKNlaB7w+MqsRbCtnefvUAOnawPkk3uv7Cx5oS//qUMb8dMX8n4lEqoW8NZ4Aq+XBi0 R1N5RaKaDSRXzwB3buJN5DXaKepcQmp5ejOJr6DFH3TcHAxOoP5h3brpPH1rEQ1fd7Wo rPGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AHA+LCiynBinIcwBex84PZFjkFyKiA5ldfw47X4q5zo=; b=NbtigHNsgiVgheDE3NFOfE8q0+jpLgMC+/SMHUH582eq26Qj2bd1n1rDaxdWasJWjY 2aVu5h/q5Qhu/qGaPCjKz7djfiMkiskUlpC/31qCtp1aPG8NaP3BH0S/ygENUmTaMJPL CqqM4DpfsbxWN3VqgUfHdzl5jPUE0zmvj5bRNHM7AspSxLf/cnfklkl/R7KKqm1zK+r/ zyqDw41ScoIarl49ZAulF5AZBJ4J7Vj8J3KCWlf+GzYunHrl5jkLaM0bkk/SCn6aTTH0 8TyW5Ksgt67NEGYX3N7+5fSKWH0LsgmpOH//b0CbB1q6NFRWBvBEzQuRzrYuNg5GvH6W 3FVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XEmpiDo0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si13049998ejl.715.2021.06.27.21.44.04; Sun, 27 Jun 2021 21:44:27 -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=@redhat.com header.s=mimecast20190719 header.b=XEmpiDo0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbhF1Emx (ORCPT + 99 others); Mon, 28 Jun 2021 00:42:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31692 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbhF1Emw (ORCPT ); Mon, 28 Jun 2021 00:42:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624855227; 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=XEmpiDo0AGOPA8jMZyl0Pxe8y6IEpHAzegq/jALcVN4tqeidsHKJgXqK7GmYbeYDpZGR0a DekUa1GgA4AImOtWhtdcysWpKzCyKY7hARoEuiuk5y8k+no66nT6gPwMRdG/rXngA+j+xj ZWZ14iv+68EEarUOHhoLg8e+MhwR2yw= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-a4zIZsEuNau9rqlPJ1FSDA-1; Mon, 28 Jun 2021 00:40:25 -0400 X-MC-Unique: a4zIZsEuNau9rqlPJ1FSDA-1 Received: by mail-pf1-f198.google.com with SMTP id s207-20020a6277d80000b0290300944a8bd2so8602002pfc.16 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=FVDzHVQdVHxfImwVVC5n3nJ0s3+X7wYB482ZFOEonfnKA8MXeQlAZ7NmrUnXK/MRSl 8CsdreCL+3sLZSkHl0aIaRDLLXWsouUqpX3gUzSeznIifuW4yHnI7jGr5KOaro+nHXX8 bvQV4D+9XY0PQrlnuenlLf8cSKYEd5n5zu/xiy24iH9CNXed76B762zJixAJElCvW3He cebGXV5u7AwWuFdJevM81er7ynjUlx6qxpGCGHYUlv1qAeL1Ewm/AOnYqFKdsSIkVax7 R2jlqmqoHovxRyQLNF31vaycK80c1N1vmQ554XX6eP0nfYeX5KGNg4RaUmgqHm3WPrMm J6DQ== X-Gm-Message-State: AOAM533VZgo0ZVxsH1DVnczPGb39vZaMK/8XjhT3KXbnl3/x4UkrDwqX d2ywniVs7EKvw/H4G19k2qNUaT+NzK329cHplLO5Kr0V+fWA/hus0r0FXZU97QqoXXWOLNTyRod OMIqBe3rThGXCDQPdRiRjXjOMVvR0Cfne6OT9bCTaD9rHuJhyhBV8RZl0aeRtp4/OZfUETazrV8 9h X-Received: by 2002:a17:90a:73ca:: with SMTP id n10mr35061295pjk.16.1624855223858; Sun, 27 Jun 2021 21:40:23 -0700 (PDT) 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-kernel@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