Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6092478ioo; Wed, 1 Jun 2022 21:20:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVXOjr7hwgiB5+e+ivJMHXGFqmiV5SrhUrL7WuFLNgcTso59IDLH7G+4RqhNq+DOr8TqNk X-Received: by 2002:a17:907:8689:b0:6fe:e525:ea9c with SMTP id qa9-20020a170907868900b006fee525ea9cmr2499503ejc.720.1654143645694; Wed, 01 Jun 2022 21:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654143645; cv=none; d=google.com; s=arc-20160816; b=Isv1S/+fTPxVIbJPDTmKGCUog/rHTcL9QHBIF+yrKiMVTvinYCkslArB96uONaZ9B7 H2lHiEeq6FznNP5GhbsarKEQe2loL5F7MwK4Z609B9IGPNswBekQydNpm8WW8PxIwyat bpyd5gGrueY14ID81aANz3LhrKqBKsw/s5FSm6zg+oBm8gCKiS/bsyt5FC8bjcu2fzK0 G4cB55148EY8ZlhbcUdVRSNrG+do/TfBPyKzuEcUv7n3NNTaU5xtKodShZAPPBujozv0 t3uj/9NJNydS1DASgv8Pdaz2RW+o5OmQOxIPKp3KazY7f5Nlj1JrcpUiTrF5eWrh81qi ultg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3nhZSbN+Ew1mV2HyhEGIhPum4yYB0PCOS8RQvOZHGfg=; b=QZdilNcSzStvXKzcL33Ml5jYh+Dtd4TEkdcdde5x8yBuirLYPxvJ8QfbdmgdjlJylc UGIInyk/YmcvRuzzpEXYtWl0AXzhX/mbl/MmHag6bI9cDBiSqlQQxIRMp/x580Q8v1FE I7vG0VHjeXqIOVOUdTQGhDUKrDFm+Fo2oUpDIUVW4E4Z8XUV8iecJ9EBN7CVOOWXQeOw T15mMqKnRN/4Xgc4ZtTgfeaTp1lNdca8rlgv8LA7w4eXKZ9Oru/5IH9Bluga1+YDSp3+ ImOnemI3WzZq1yvtZ2+18ELP87uUrck2etlA4p+dICUfGurvdHFlorzPWqLbvH0Ze/Ce 8vbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EbueC4Ek; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du12-20020a17090772cc00b006fa95d2994csi3743469ejc.813.2022.06.01.21.20.17; Wed, 01 Jun 2022 21:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EbueC4Ek; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229605AbiFBDx5 (ORCPT + 99 others); Wed, 1 Jun 2022 23:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiFBDxz (ORCPT ); Wed, 1 Jun 2022 23:53:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F6F524BC4 for ; Wed, 1 Jun 2022 20:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654142033; 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=3nhZSbN+Ew1mV2HyhEGIhPum4yYB0PCOS8RQvOZHGfg=; b=EbueC4Ek4SCHEGKpbe9TcZm+cERk+MjUTz5qx/k68szCuMilSg+eJiApbVfxBpfvW26F57 uonwI+lctnkHvExVgLTJRTExWqPXcuJT7GXnHvX2bDV/dHvNZuEW4NuAN5ZAD8ue/UD1ue SG+KaQeDk50O1G8n3dbJ9uOx2Ji4tMk= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-577-xeHVtaYPM6qg6ypKDgw8rw-1; Wed, 01 Jun 2022 23:53:52 -0400 X-MC-Unique: xeHVtaYPM6qg6ypKDgw8rw-1 Received: by mail-lf1-f71.google.com with SMTP id a29-20020a194f5d000000b004790a4ba4bdso869287lfk.11 for ; Wed, 01 Jun 2022 20:53:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3nhZSbN+Ew1mV2HyhEGIhPum4yYB0PCOS8RQvOZHGfg=; b=P1W8wfES/0iU/ap45ryESBwZ3P8PeiTd6B5kFtCVj84dDM8uOvW+mJD3eHk4KnX73I k4cM+DHi0/f+05NWxJJ7aHlwblWw47XjOu2H/BMWqLjxDJW/g1dP+s/HG89Qm/0F16zE hj2F918FKJLaKAzumwiDc4b87nenAXAknWNdtHW1c6o9K/SVS8X3YYv5nY0hVNnV6muK mlX6tijdT7Gns7DA6iiqToH7muI24VzPx9vpY6v2vgOUyfG7NgNS0Qz4QaAQMpjMclvS BHz+6M0z2VtgA5mU7YzLO4ao2R3/KP3yH/S3aEX+TvCc+T/S1eadT9L/mhes0Ewhyp26 Xx/w== X-Gm-Message-State: AOAM531TZlkIDK+rEyIizLXRGr6XeHcDW07YTg2f7S6I3DGygcE/kAmI 34IumFznq5KqJS0ZKBAn3Qxsl3Zm3iC0ZK/SrJs7Zh+0SrUu5ilW2JLwOof5dPexoIvcMbccyrN Gt0lYnIA8Hh8gU7ndjvzrxilN/vgrKU+aMT1Ln3Dl X-Received: by 2002:a2e:910e:0:b0:255:4a7e:b42e with SMTP id m14-20020a2e910e000000b002554a7eb42emr13517219ljg.492.1654142030532; Wed, 01 Jun 2022 20:53:50 -0700 (PDT) X-Received: by 2002:a2e:910e:0:b0:255:4a7e:b42e with SMTP id m14-20020a2e910e000000b002554a7eb42emr13517199ljg.492.1654142030349; Wed, 01 Jun 2022 20:53:50 -0700 (PDT) MIME-Version: 1.0 References: <20220526124338.36247-1-eperezma@redhat.com> <20220527065442-mutt-send-email-mst@kernel.org> In-Reply-To: From: Jason Wang Date: Thu, 2 Jun 2022 11:53:39 +0800 Message-ID: Subject: Re: [PATCH v4 0/4] Implement vdpasim stop operation To: Parav Pandit Cc: "Michael S. Tsirkin" , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "martinh@xilinx.com" , Stefano Garzarella , "martinpo@xilinx.com" , "lvivier@redhat.com" , "pabloc@xilinx.com" , Eli Cohen , Dan Carpenter , Xie Yongji , Christophe JAILLET , Zhang Min , Wu Zongyong , "lulu@redhat.com" , Zhu Lingshan , "Piotr.Uminski@intel.com" , Si-Wei Liu , "ecree.xilinx@gmail.com" , "gautam.dawar@amd.com" , "habetsm.xilinx@gmail.com" , "tanuj.kamde@amd.com" , "hanand@xilinx.com" , "dinang@xilinx.com" , Longpeng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 2, 2022 at 10:59 AM Parav Pandit wrote: > > > > From: Jason Wang > > Sent: Wednesday, June 1, 2022 10:00 PM > > > > On Thu, Jun 2, 2022 at 2:58 AM Parav Pandit wrote: > > > > > > > > > > From: Jason Wang > > > > Sent: Tuesday, May 31, 2022 10:42 PM > > > > > > > > Well, the ability to query the virtqueue state was proposed as > > > > another feature (Eugenio, please correct me). This should be > > > > sufficient for making virtio-net to be live migrated. > > > > > > > The device is stopped, it won't answer to this special vq config done here. > > > > This depends on the definition of the stop. Any query to the device state > > should be allowed otherwise it's meaningless for us. > > > > > Programming all of these using cfg registers doesn't scale for on-chip > > memory and for the speed. > > > > Well, they are orthogonal and what I want to say is, we should first define > > the semantics of stop and state of the virtqueue. > > > > Such a facility could be accessed by either transport specific method or admin > > virtqueue, it totally depends on the hardware architecture of the vendor. > > > I find it hard to believe that a vendor can implement a CVQ but not AQ and chose to expose tens of hundreds of registers. > But maybe, it fits some specific hw. You can have a look at the ifcvf dpdk driver as an example. But another thing that is unrelated to hardware architecture is the nesting support. Having admin virtqueue in a nesting environment looks like an overkill. Presenting a register in L1 and map it to L0's admin should be good enough. > > I like to learn the advantages of such method other than simplicity. > > We can clearly that we are shifting away from such PCI registers with SIOV, IMS and other scalable solutions. > virtio drifting in reverse direction by introducing more registers as transport. > I expect it to an optional transport like AQ. Actually, I had a proposal of using admin virtqueue as a transport, it's designed to be SIOV/IMS capable. And it's not hard to extend it with the state/stop support etc. > > > > > > > Next would be to program hundreds of statistics of the 64 VQs through a > > giant PCI config space register in some busy polling scheme. > > > > We don't need giant config space, and this method has been implemented > > by some vDPA vendors. > > > There are tens of 64-bit counters per VQs. These needs to programmed on destination side. > Programming these via registers requires exposing them on the registers. > In one of the proposals, I see them being queried via CVQ from the device. I didn't see a proposal like this. And I don't think querying general virtio state like idx with a device specific CVQ is a good design. > > Programming them via cfg registers requires large cfg space or synchronous programming until receiving ACK from it. > This means one entry at a time... > > Programming them via CVQ needs replicate and align cmd values etc on all device types. All duplicate and hard to maintain. > > > > > > > > I can clearly see how all these are inefficient for faster LM. > > > We need an efficient AQ to proceed with at minimum. > > > > I'm fine with admin virtqueue, but the stop and state are orthogonal to that. > > And using admin virtqueue for stop/state will be more natural if we use > > admin virtqueue as a transport. > Ok. > We should have defined it bit earlier that all vendors can use. :( I agree. Thanks