Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3420757ioo; Mon, 30 May 2022 01:26:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzanynIEQ4fOTl4NfGpKX3gyTosGWAxwzhhn69dtYo1qmnishvcx7J7ajeQFm2r+vQSFL/S X-Received: by 2002:a17:90a:7381:b0:1e2:ff0f:df07 with SMTP id j1-20020a17090a738100b001e2ff0fdf07mr3856889pjg.160.1653899214767; Mon, 30 May 2022 01:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653899214; cv=none; d=google.com; s=arc-20160816; b=h4WVfsBxupaaWcUezFztk7h6/wmrLZLM5E/5p4XELGuCTvKEl/68+XqmBbqsySJ3Nw jhMTt9tnAZ4BCQWZAh3D704zJf1HaZIV0Xt96RDTLZOjD1v4OINs+CWJTqv+xTIZC1Ui 0h7qVwGmEpxIokNczUq6TCfn6p5ERJ6zT8aKnjWpF8KdFwmLeHx1p/WizAtafFEWOToL Xy1PeGQm5Av3tu6Sug83TUtJlgyb/95ZMwnxi9wX+gcSs3eurkjp2X13A6zqbJGqMcUa 0SKhZpmq+YbZEYHjDv3e8bkAvOds37rECgV9c+BUCOTDyDiTQbM1rDOYIDct+HL69euo jjxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FdZG8wd/mfaE1rIlJ69hB8EXyZHW/gHoxx+VKCUjuys=; b=F3cBpBoRN3ZEuVm0KcLDl/q3HjA3uC1T6yQvJ2ppYwEreJDXxqxLi+P0/qM7y3PTtQ nG3Dy/i4zTLAD90GabjPaiaFcd1EVEAwZWco6C3H16T0QvtundrKFqN2/g8Ccfg4BFRs /hleY/kE2aKrU5xwcOQZYWKfMJy9DJyYT+dIqQ31D6kj3AUonts+AknfGA6r8pHduO7+ ea2S+XkrBJffLWOT6GHXi3BzOpABVw/t9sPnopz5T3vrV4IGIdpn6LBcwoX7T0VL2RJu erg/wUJtFvPnuWbKvAYlCli1dGM47O/8wFDKmVu9cspC/YJFOqjq7DuFzxeUtDI+bLx7 XUzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jjzoh9QA; 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 e5-20020a17090a280500b001df960c0135si10980457pjd.103.2022.05.30.01.26.41; Mon, 30 May 2022 01:26:54 -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=Jjzoh9QA; 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 S232375AbiE3Djn (ORCPT + 99 others); Sun, 29 May 2022 23:39:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbiE3Dji (ORCPT ); Sun, 29 May 2022 23:39:38 -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 A7FD4719F0 for ; Sun, 29 May 2022 20:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653881975; 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=FdZG8wd/mfaE1rIlJ69hB8EXyZHW/gHoxx+VKCUjuys=; b=Jjzoh9QA1gH+XboJr1s4bzFEH97iKQlySG9L4fbxysEXFsWvuKWNHVA3q6gq6ILvJCCTFn 057HsOalJYU/yMzWuW/bKzhU/qSXB+saHfdubzo/PK/h3vb3oIA2DtAoW2GkY+/PRixWcC ic2ne+7dSF5bCYCtYD0o2+f1+1XfAi4= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-623-up2NUfEOPQubt0ZG_ul0sg-1; Sun, 29 May 2022 23:39:34 -0400 X-MC-Unique: up2NUfEOPQubt0ZG_ul0sg-1 Received: by mail-lf1-f72.google.com with SMTP id c6-20020a056512104600b00477b25bfdf8so4646261lfb.9 for ; Sun, 29 May 2022 20:39:34 -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:content-transfer-encoding; bh=FdZG8wd/mfaE1rIlJ69hB8EXyZHW/gHoxx+VKCUjuys=; b=d+HSS5qz2Autm9iaOQPzPRp9KvKVlDX+x8M4fGwAoWitTf9+TgwKmgMAWDQtlY8De+ VCUjLr/FPt10ug5OpPB66qA20bb2QUgew4LBaHn5u0eZBGFp+vcPWBmqGVNTqOSuWp5F ujhv+PleIOU6ppQRgnaX7MEl8O0+pduulaEPVww5SWjnBGFrLTr3cPDEs0vWugumRzOs RQZ5oBYkuLal8xzln0I/NsXRcXMtvsDS4Wk5dfUg8I5Y90qxTlo1FZNOQUxDqGOIuCbx zAYvrRcoZV7PtLr+6jsRXAnS+OglnyB39XbSnNZOHEl9NQk6FpTPT5NfrAWM5W95/IBv ru0A== X-Gm-Message-State: AOAM533zK59QeMGyrEORDoiK31SBOwOs/Yv0REP4IcDbUE5V7BXBhIF/ oo/R8lSjxRUkJ+f83Ka1uxWhGnRdSig0EkK1jddGXrYP62FHIMIAh5U99NFgqInrG2ufw3anLlB boeML/b7ceERXGMpBWO5foJ8NbOFZ9aIwr3E3IzyG X-Received: by 2002:a2e:bd85:0:b0:250:9bf2:8e27 with SMTP id o5-20020a2ebd85000000b002509bf28e27mr31984316ljq.177.1653881972926; Sun, 29 May 2022 20:39:32 -0700 (PDT) X-Received: by 2002:a2e:bd85:0:b0:250:9bf2:8e27 with SMTP id o5-20020a2ebd85000000b002509bf28e27mr31984290ljq.177.1653881972697; Sun, 29 May 2022 20:39:32 -0700 (PDT) MIME-Version: 1.0 References: <20220526124338.36247-1-eperezma@redhat.com> <20220527065442-mutt-send-email-mst@kernel.org> In-Reply-To: <20220527065442-mutt-send-email-mst@kernel.org> From: Jason Wang Date: Mon, 30 May 2022 11:39:21 +0800 Message-ID: Subject: Re: [PATCH v4 0/4] Implement vdpasim stop operation To: "Michael S. Tsirkin" Cc: Parav Pandit , =?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" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 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=unavailable 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 Fri, May 27, 2022 at 6:56 PM Michael S. Tsirkin wrote: > > On Thu, May 26, 2022 at 12:54:32PM +0000, Parav Pandit wrote: > > > > > > > From: Eugenio P=C3=A9rez > > > Sent: Thursday, May 26, 2022 8:44 AM > > > > > Implement stop operation for vdpa_sim devices, so vhost-vdpa will off= er > > > > > > that backend feature and userspace can effectively stop the device. > > > > > > > > > > > > This is a must before get virtqueue indexes (base) for live migration= , > > > > > > since the device could modify them after userland gets them. There ar= e > > > > > > individual ways to perform that action for some devices > > > > > > (VHOST_NET_SET_BACKEND, VHOST_VSOCK_SET_RUNNING, ...) but there > > > was no > > > > > > way to perform it for any vhost device (and, in particular, vhost-vdp= a). > > > > > > > > > > > > After the return of ioctl with stop !=3D 0, the device MUST finish an= y > > > > > > pending operations like in flight requests. It must also preserve all > > > > > > the necessary state (the virtqueue vring base plus the possible devic= e > > > > > > specific states) that is required for restoring in the future. The > > > > > > device must not change its configuration after that point. > > > > > > > > > > > > After the return of ioctl with stop =3D=3D 0, the device can continue > > > > > > processing buffers as long as typical conditions are met (vq is enabl= ed, > > > > > > DRIVER_OK status bit is enabled, etc). > > > > Just to be clear, we are adding vdpa level new ioctl() that doesn=E2=80= =99t map to any mechanism in the virtio spec. > > > > Why can't we use this ioctl() to indicate driver to start/stop the devi= ce instead of driving it through the driver_ok? > > This is in the context of other discussion we had in the LM series. > > If there's something in the spec that does this then let's use that. Actually, we try to propose a independent feature here: https://lists.oasis-open.org/archives/virtio-dev/202111/msg00020.html Does it make sense to you? Thanks > Unfortunately the LM series seems to be stuck on moving > bits around with the admin virtqueue ... > > -- > MST >