Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp51748iog; Tue, 14 Jun 2022 18:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvsMh7xbfTI2a6ydvvQaLzOzlUeTnu291lW4B6iw8m69oJ8IOfmXvzzNHjy3V4oIhCaVhP X-Received: by 2002:a05:6402:3291:b0:42d:dd03:cbb1 with SMTP id f17-20020a056402329100b0042ddd03cbb1mr9532377eda.268.1655257660822; Tue, 14 Jun 2022 18:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655257660; cv=none; d=google.com; s=arc-20160816; b=HeaM7P6LgLdDpU3ob9zQNEvAwTC/ENDtgkP6qFwOMthx4M0KsoqF7kx4qd6qPE0zpJ XnaQmQ4TBQpk7slYY7OnN9Qb//bE5LHSBCJJTV+9ykjq6RGzmvNY+qb1q8FRGObL3qk0 MYoauZBr7gZTweosz4M8dZBHXLs29IiGy/AQEQO4Cum0wIzDnom4Bbla7amsCNVjp5Xh yG7GmP0YaFjAl39EvRtH9cRqiUyTYomk7MlFOBA8oG89xCSM2CB597nCc94yN2uo4Ex0 2S7XWZKFVeFsdJZNBzu0jlpW7Uz47izuvRwjNULGvnwEbeo5V9+WvGgnAenPn5XhYVNq pIzA== 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=gPcslwf6/5AipVOiJxjFuNmMuJiLjP5Ai/xX9fViRS4=; b=dOib7DYYAaKJMsl1933peFZRWGn1UTBLZ0eMuhOqk0lpO4mRHx7uX6KDTj5lMWYPLH XodqcTivWN3ajzWLwdgsUlC6A6TMIPyX4XK+OzSPOzS1/4NPDg3qw/ZTTgKu9yEG6xMm 2gZRmfppVEPv1OMol59zvZk6cdlhMAhvacGkxvXtasPEHgHm4kHOSVmpV8iwAjg1+DC9 KO85Js+9s5LUVzv6pI8BhvINqip19YkLXBxseQSfY9R66Aom/JVbNh4QuQyIH1zF+DeZ 1NKi/8fqMZtRqdafKjF6Ddkqawdh2TBMVOxUdrA9xq4qsq9bQ6P+SRnJC1ajdQ49Dj79 gikA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QQbe3riA; 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 d21-20020a056402401500b0043176d24d56si12648083eda.342.2022.06.14.18.46.57; Tue, 14 Jun 2022 18:47:40 -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=QQbe3riA; 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 S238480AbiFOB3H (ORCPT + 99 others); Tue, 14 Jun 2022 21:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbiFOB3F (ORCPT ); Tue, 14 Jun 2022 21:29:05 -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 ABC792DAAE for ; Tue, 14 Jun 2022 18:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655256543; 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=gPcslwf6/5AipVOiJxjFuNmMuJiLjP5Ai/xX9fViRS4=; b=QQbe3riAOnysT+McwsCYR7Jyb8wsIGxw0xHpuuwGxDvnfL07OpA2GcdlJt73su7ULDMVJs pBGne0MMx/OjS1c+f9I8qBWpOzkmDSoyY4iVsGJgeKM4J3jhnt3ItQn8z/JXzc98UVcRiL MsVXOP/B3BBLDgk1C1fBhYlxajhAZhI= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-aQfEcPsEOPueazRk0aUN3Q-1; Tue, 14 Jun 2022 21:29:02 -0400 X-MC-Unique: aQfEcPsEOPueazRk0aUN3Q-1 Received: by mail-lj1-f200.google.com with SMTP id b26-20020a2e989a000000b002556f92fa13so1557754ljj.15 for ; Tue, 14 Jun 2022 18:29:02 -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=gPcslwf6/5AipVOiJxjFuNmMuJiLjP5Ai/xX9fViRS4=; b=pwUJJl8ka1/9qj5CouNOYHEMM/D5eiZl5rp+0kYhedaU2ehYt5lSEuSOAU+V+2dE5E ZFQTHVMrGbOZAY7C182jelohgIZq6rBA0jNYpTbnhbYvrVQkHztuYDJeuNgI7DgRJjqf 2I8uKMGRTNMJz81hQLUoO6lBP4ssLxbggVsEnQxNpDrwjIG/zI/Pwtrt5c4bt9d8/de6 C3il8ZTp980Ml4CSMZCGPB5UbZ6LneZ7LFyC62eazGGTbGkQpvoHRRxk11Qri33l0ZQw JsfnBVb//RJEROYZqnBy+uNGq0LwEACV8b3nqh/zGY6Ixfnb8WGi/h8i6tI6HdtCGom5 YaGw== X-Gm-Message-State: AJIora9fYQdm0biSqTkUesTwMn3geA5WPzgga8Lwbaxvb8YNrba4WyAT 6zNdH9BGnBf6FW2TrZEn8Ytv7/RVHHmHsL13Vvla8c377dZbK9mVJoYZBscpPb7TzXz+6vsspWr swk9ecy0L1OVfj6/TN+mD6v7WvehCEFO5EM/KJTic X-Received: by 2002:a19:4352:0:b0:479:5d1:3fef with SMTP id m18-20020a194352000000b0047905d13fefmr4549844lfj.411.1655256541077; Tue, 14 Jun 2022 18:29:01 -0700 (PDT) X-Received: by 2002:a19:4352:0:b0:479:5d1:3fef with SMTP id m18-20020a194352000000b0047905d13fefmr4549812lfj.411.1655256540740; Tue, 14 Jun 2022 18:29:00 -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: Wed, 15 Jun 2022 09:28:49 +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=-3.3 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 Wed, Jun 15, 2022 at 8:10 AM Parav Pandit wrote: > > > > > From: Jason Wang > > Sent: Wednesday, June 1, 2022 11:54 PM > > > > 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. > > > Ifcvf is an example of using registers. > It is not an answer why AQ is hard for it. :) Well, it's an example of how vDPA is implemented. I think we agree that for vDPA, vendors have the flexibility to implement their perferrable datapath. > virtio spec has definition of queue now and implementing yet another queue shouldn't be a problem. > > So far no one seem to have problem with the additional queue. > So I take it as AQ is ok. > > > 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. > So may be a optimized interface can be added that fits nested env. > At this point in time real users that we heard are interested in non-nested use cases. Let's enable them first. That's fine. For nests, it's actually really easy, just adding an interface within the existing transport should be sufficient. > > > > > > > > > > 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. > > > My example was not for the idx. But for VQ statistics that is queried via CVQ. > > > > > > > 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. > > I remember few months back, you acked in the weekly meeting that TC has approved the AQ direction. > And we are still in this circle of debating the AQ. I think not. Just to make sure we are on the same page, the proposal here is for vDPA, and hope it can provide forward compatibility to virtio. So in the context of vDPA, admin virtqueue is not a must. Thanks