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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, 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 33095C07E95 for ; Tue, 20 Jul 2021 11:05:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1522261175 for ; Tue, 20 Jul 2021 11:05:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238242AbhGTKZK (ORCPT ); Tue, 20 Jul 2021 06:25:10 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:52555 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236973AbhGTKZE (ORCPT ); Tue, 20 Jul 2021 06:25:04 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UgQE4aC_1626779139; Received: from B-LB6YLVDL-0141.local(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0UgQE4aC_1626779139) by smtp.aliyun-inc.com(127.0.0.1); Tue, 20 Jul 2021 19:05:40 +0800 From: Xianting Tian Subject: Re: [PATCH v2] vsock/virtio: set vsock frontend ready in virtio_vsock_probe() To: Stefan Hajnoczi Cc: sgarzare@redhat.com, davem@davemloft.net, kuba@kernel.org, jasowang@redhat.com, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210720071337.1995-1-xianting.tian@linux.alibaba.com> Message-ID: Date: Tue, 20 Jul 2021 19:05:39 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 在 2021/7/20 下午6:23, Stefan Hajnoczi 写道: > On Tue, Jul 20, 2021 at 03:13:37PM +0800, Xianting Tian wrote: >> Add the missed virtio_device_ready() to set vsock frontend ready. >> >> Signed-off-by: Xianting Tian >> --- >> net/vmw_vsock/virtio_transport.c | 2 ++ >> 1 file changed, 2 insertions(+) > Please include a changelog when you send v2, v3, etc patches. OK, thanks. >> diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c >> index e0c2c992a..dc834b8fd 100644 >> --- a/net/vmw_vsock/virtio_transport.c >> +++ b/net/vmw_vsock/virtio_transport.c >> @@ -639,6 +639,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev) >> >> mutex_unlock(&the_virtio_vsock_mutex); >> >> + virtio_device_ready(vdev); > Why is this patch necessary? Sorry, I didn't notice the check in virtio_dev_probe(), As Jason comment,  I alsoe think we need to be consistent: switch to use virtio_device_ready() for all the drivers. What's opinion about this? > The core virtio_dev_probe() code already calls virtio_device_ready for > us: > > static int virtio_dev_probe(struct device *_d) > { > ... > err = drv->probe(dev); > if (err) > goto err; > > /* If probe didn't do it, mark device DRIVER_OK ourselves. */ > if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK)) > virtio_device_ready(dev);