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 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC43DC433F5 for ; Fri, 27 May 2022 10:56:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 455C04134F; Fri, 27 May 2022 10:56:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RQrto7cpbN-I; Fri, 27 May 2022 10:56:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id D8FBA41349; Fri, 27 May 2022 10:55:59 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 98CC8C0032; Fri, 27 May 2022 10:55:59 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6DF0DC002D for ; Fri, 27 May 2022 10:55:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5637441349 for ; Fri, 27 May 2022 10:55:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gcJ_hzy-Izef for ; Fri, 27 May 2022 10:55:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9EBC14056C for ; Fri, 27 May 2022 10:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653648956; 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=gGQcppmnDaS/J3TRXiziyA5gL0rtQs0/Sd1uzUmYxEU=; b=TX/g3FXr8yz7Z4SKaqizhItgcvzPTwiWs0UnO8RLql2ZHXLrE2lKFmltLJ5ce6ogyCaDhz ouvtKFLXGk4YeaN6GwgYLwfU/yQCE1a5tCf2rYiwgU5NI2oGD3uAQplMj+KX0jiUH9ITDp 5O/lrqM8QeB445XnLCX8/8ysK6lxKYQ= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-EoaRmsEIPXa6tO0h_FvDzA-1; Fri, 27 May 2022 06:55:55 -0400 X-MC-Unique: EoaRmsEIPXa6tO0h_FvDzA-1 Received: by mail-ed1-f71.google.com with SMTP id r10-20020aa7c14a000000b0042bcc99e4cdso2827466edp.18 for ; Fri, 27 May 2022 03:55:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=gGQcppmnDaS/J3TRXiziyA5gL0rtQs0/Sd1uzUmYxEU=; b=BgrHCKA5OsgqJKpX2QlJW5HoVEJieJqpi4K7GSBnMSphFq07vm8GetfySPPPkj48++ otbEi6QPAjJP2jHnMIUF6AfNPtv9qHu1B+tMiPolaOSqdiJPk7Daq9myd5UMobfxGjoi P2tuTX0v0fBIYrn7SwibROULtIuHKhNsMAlKhTpmWE6kM3Z+hmkhObkd9FgJ7UwnNYBY r4KlJ3zZNA5EkNB/+PKizmmOP7wWce0A7O7JCuKuRfHyCtb59yIfV/HNi4kxClgrMqx/ UWGhAKu2lnu8bTTyIRrImhYeTw7W/jgICd6pEVW6s5yZdo1L3P4vfQrimB7Pj4mWlZDd 64ZQ== X-Gm-Message-State: AOAM533DybZnzwL9zRsG5LX6yicH0mXOxwW55XvsABG2A9rKfpiewKOx LmGkbj1+glSrN1EJqiR0N6iwHYaul2psb9L1XW1ztrMISRBId2hI1r7yMd381scMKgscYtZ9LuQ K6b1BKRRJmdnNE2/xZ0/C02L50Iy8Jat4ywl+hELrcA== X-Received: by 2002:a17:907:8a03:b0:6fe:c10d:4bf8 with SMTP id sc3-20020a1709078a0300b006fec10d4bf8mr27371025ejc.308.1653648953916; Fri, 27 May 2022 03:55:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyjSEByHUT1dN2e6dwR/wwQsgGO85W9JgRso9Wz+PFfyejclX0Yhn5dm9pxNJ4ZMKkOZKFiA== X-Received: by 2002:a17:907:8a03:b0:6fe:c10d:4bf8 with SMTP id sc3-20020a1709078a0300b006fec10d4bf8mr27371006ejc.308.1653648953659; Fri, 27 May 2022 03:55:53 -0700 (PDT) Received: from redhat.com ([2.55.130.213]) by smtp.gmail.com with ESMTPSA id fm6-20020a1709072ac600b006fec98edf3asm1318544ejc.166.2022.05.27.03.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 03:55:53 -0700 (PDT) Date: Fri, 27 May 2022 06:55:44 -0400 From: "Michael S. Tsirkin" To: Parav Pandit Subject: Re: [PATCH v4 0/4] Implement vdpasim stop operation Message-ID: <20220527065442-mutt-send-email-mst@kernel.org> References: <20220526124338.36247-1-eperezma@redhat.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: "tanuj.kamde@amd.com" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Wu Zongyong , Si-Wei Liu , "pabloc@xilinx.com" , Eli Cohen , Zhang Min , "lulu@redhat.com" , Eugenio =?iso-8859-1?Q?P=E9rez?= , "Piotr.Uminski@intel.com" , "martinh@xilinx.com" , Xie Yongji , "dinang@xilinx.com" , "habetsm.xilinx@gmail.com" , Longpeng , Dan Carpenter , "lvivier@redhat.com" , Christophe JAILLET , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ecree.xilinx@gmail.com" , "hanand@xilinx.com" , "martinpo@xilinx.com" , "gautam.dawar@amd.com" , Zhu Lingshan X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" T24gVGh1LCBNYXkgMjYsIDIwMjIgYXQgMTI6NTQ6MzJQTSArMDAwMCwgUGFyYXYgUGFuZGl0IHdy b3RlOgo+IAo+IAo+ID4gRnJvbTogRXVnZW5pbyBQw6lyZXogPGVwZXJlem1hQHJlZGhhdC5jb20+ Cj4gPiBTZW50OiBUaHVyc2RheSwgTWF5IDI2LCAyMDIyIDg6NDQgQU0KPiAKPiA+IEltcGxlbWVu dCBzdG9wIG9wZXJhdGlvbiBmb3IgdmRwYV9zaW0gZGV2aWNlcywgc28gdmhvc3QtdmRwYSB3aWxs IG9mZmVyCj4gPiAKPiA+IHRoYXQgYmFja2VuZCBmZWF0dXJlIGFuZCB1c2Vyc3BhY2UgY2FuIGVm ZmVjdGl2ZWx5IHN0b3AgdGhlIGRldmljZS4KPiA+IAo+ID4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pemF0aW9uQGxpc3RzLmxpbnV4LWZvdW5kYXRpb24ub3JnCmh0dHBzOi8vbGlzdHMu bGludXhmb3VuZGF0aW9uLm9yZy9tYWlsbWFuL2xpc3RpbmZvL3ZpcnR1YWxpemF0aW9u 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC0AC4321E for ; Fri, 27 May 2022 10:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350689AbiE0K4B (ORCPT ); Fri, 27 May 2022 06:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348329AbiE0Kz6 (ORCPT ); Fri, 27 May 2022 06:55:58 -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 1DFB112E307 for ; Fri, 27 May 2022 03:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653648956; 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=gGQcppmnDaS/J3TRXiziyA5gL0rtQs0/Sd1uzUmYxEU=; b=TX/g3FXr8yz7Z4SKaqizhItgcvzPTwiWs0UnO8RLql2ZHXLrE2lKFmltLJ5ce6ogyCaDhz ouvtKFLXGk4YeaN6GwgYLwfU/yQCE1a5tCf2rYiwgU5NI2oGD3uAQplMj+KX0jiUH9ITDp 5O/lrqM8QeB445XnLCX8/8ysK6lxKYQ= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-209-mICj_Q5lOJiHD-CnY87Xaw-1; Fri, 27 May 2022 06:55:55 -0400 X-MC-Unique: mICj_Q5lOJiHD-CnY87Xaw-1 Received: by mail-ed1-f72.google.com with SMTP id b7-20020aa7c6c7000000b0042d3678568dso710248eds.8 for ; Fri, 27 May 2022 03:55:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=gGQcppmnDaS/J3TRXiziyA5gL0rtQs0/Sd1uzUmYxEU=; b=K6ogDdSghW2MAE2rZX9JmpFEMyt6zY7r1UAGi2dgGOqzIdLWzYbWWHwO4PdKQGn0Mx CbI2BjO6qpk51GvGDDAYKrkKR4WQ9RJfFLaxzgE4Sva5PgIhSBFq6KRxl3GNBoRYnRLe iKvyGxbfwgGhQ4r5aw2nm18LEc3giAMnILR2ll+VXsSqvt7nvzzMdTmM2OCtSWH7+mh2 7AGo7B4GrXQZyFM7weSJgAg7QUlBakf6Fcjyr/z2BIDY/MR9vbs08+hoH61gpUEzPuZs WzTtBDs87P7CfgoWfpWhZ+6ZTooSL41ZyRwi1JdAhKtpCYZKYMrISRUu65EeetZoer7D tAmg== X-Gm-Message-State: AOAM531S2aRyql5FsWtqpmJY+IaQrj+uvIN0O3993Ch7uV0tkh8O8bhd e5ybVfkEGyGYepGJmS3dYXzn5EH/Xh0qCepXXPbcCeEAbm+WEtUpxvkuCGx9aKsBOmtvdOPLBoO 12ZV6XkrEaJpv X-Received: by 2002:a17:907:8a03:b0:6fe:c10d:4bf8 with SMTP id sc3-20020a1709078a0300b006fec10d4bf8mr27371046ejc.308.1653648953925; Fri, 27 May 2022 03:55:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyjSEByHUT1dN2e6dwR/wwQsgGO85W9JgRso9Wz+PFfyejclX0Yhn5dm9pxNJ4ZMKkOZKFiA== X-Received: by 2002:a17:907:8a03:b0:6fe:c10d:4bf8 with SMTP id sc3-20020a1709078a0300b006fec10d4bf8mr27371006ejc.308.1653648953659; Fri, 27 May 2022 03:55:53 -0700 (PDT) Received: from redhat.com ([2.55.130.213]) by smtp.gmail.com with ESMTPSA id fm6-20020a1709072ac600b006fec98edf3asm1318544ejc.166.2022.05.27.03.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 03:55:53 -0700 (PDT) Date: Fri, 27 May 2022 06:55:44 -0400 From: "Michael S. Tsirkin" To: Parav Pandit Cc: Eugenio =?iso-8859-1?Q?P=E9rez?= , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Jason Wang , "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 Subject: Re: [PATCH v4 0/4] Implement vdpasim stop operation Message-ID: <20220527065442-mutt-send-email-mst@kernel.org> References: <20220526124338.36247-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, May 26, 2022 at 12:54:32PM +0000, Parav Pandit wrote: > > > > From: Eugenio Pérez > > Sent: Thursday, May 26, 2022 8:44 AM > > > Implement stop operation for vdpa_sim devices, so vhost-vdpa will offer > > > > 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 are > > > > 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-vdpa). > > > > > > > > After the return of ioctl with stop != 0, the device MUST finish any > > > > pending operations like in flight requests. It must also preserve all > > > > the necessary state (the virtqueue vring base plus the possible device > > > > 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 == 0, the device can continue > > > > processing buffers as long as typical conditions are met (vq is enabled, > > > > DRIVER_OK status bit is enabled, etc). > > Just to be clear, we are adding vdpa level new ioctl() that doesn’t map to any mechanism in the virtio spec. > > Why can't we use this ioctl() to indicate driver to start/stop the device 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. Unfortunately the LM series seems to be stuck on moving bits around with the admin virtqueue ... -- MST