Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1274784lfc; Wed, 1 Jun 2022 13:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4LVC+E2aDsi+nt26Gp7IoHS7LGQOLfTuKUs/trH4SHEm6qIcRjyt7cPOPvuaBEJS/7grA X-Received: by 2002:a63:4401:0:b0:3fa:df3:4201 with SMTP id r1-20020a634401000000b003fa0df34201mr1077731pga.65.1654116764520; Wed, 01 Jun 2022 13:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116764; cv=none; d=google.com; s=arc-20160816; b=o8P9zRWTawHlO1ZBN8TuLZgTH/uFpl0noSnvSSV8gwXpZbswA8uYoehLwaAvAoqw5a JxYJzZI0FY/Vnme4AMUPwWDvJ3lu7Wm7v5s57ppeZVSfDARne3X5HCoa/EHgAMIQS3ZB /HOloxoHqXcIkZOu5Ou1LlnkJNoytGWxtxyoRquKU72j96SIsjNJr8c6osM+iSqIfOAw GBNtZEMa/LkXwc5yv5bkm0zQ9NCsUyI7FLtJhnv9v7Aiw0QRWsCHeYInXG2O7fpux914 adHYPwp6WaVxod7tT5VVxo8L9xJWIdsdeKhY5PQS+EldQrxgXs3LkE5t6yR0U1cooh1S pWww== 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=MWmZwzFVpRksBO4BOLojz9NUjcykvBgvkXhMFxoUwY0=; b=wmb4/p3FHF6Mw8z1ky2IDQXnKeOtXdE+bmmSu90gmP+e2LgbM1bov7S5SwRk7Sc23F 1AA+oYxE/ma8P+VPkeOVVKmdDMbVSyjkW+Ji3JW6c5oT96WYNB03cW30PRWivB4ym2Qm K7JALzuvOhmdgcS7c3RYoA38awkaFm/GtvlVl+gpW3maMYNw3fvbhPx6EfvrGVv2FSqN n6wVA6LXsOQRPYca3j339cF03a9TxDgJT07WMakw8dZHnMAVXO5fpSZ0+V8fJxd3uqZR mKkdoxaw6qyh4zLBhpGQLpXMMtseV5ExMI7Hu3OA6ebKhZ9pkXEIZyKYuvWjeZ0xF7ap 4sbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SUvqI2yu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w22-20020a631616000000b003faf501eeecsi3293750pgl.660.2022.06.01.13.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:52:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SUvqI2yu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DD4562BC4F9; Wed, 1 Jun 2022 12:59:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349936AbiFAGx7 (ORCPT + 99 others); Wed, 1 Jun 2022 02:53:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344194AbiFAGx6 (ORCPT ); Wed, 1 Jun 2022 02:53:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 44CC0483B4 for ; Tue, 31 May 2022 23:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654066436; 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=MWmZwzFVpRksBO4BOLojz9NUjcykvBgvkXhMFxoUwY0=; b=SUvqI2yud/hJezmgwK7tLL5n1BprhNBblapWRuco7yEV1EOZHnJXQq4jVGoyHL0D3Nv++D DZ+9lJ2/vRzG/Ysdket+MWYcgCFXSkofMxHofgDZLUsDeB+67e9bpZ7C/B62KpmsTKGPJs kaQrhiGKNJJoZOYpAgmRJTe1y1bxRWE= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-510-GTiykojcNo6de0JThg55Ww-1; Wed, 01 Jun 2022 02:53:55 -0400 X-MC-Unique: GTiykojcNo6de0JThg55Ww-1 Received: by mail-qv1-f72.google.com with SMTP id i6-20020a0cd846000000b0046262337c65so726923qvj.20 for ; Tue, 31 May 2022 23:53:55 -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=MWmZwzFVpRksBO4BOLojz9NUjcykvBgvkXhMFxoUwY0=; b=Lniagw2WEU9wQ/DiMDgtglNC3SuHEvdCbkPbqgUHjulwQvtzfv3jOZWXQcgUTgsejG MsyYSP9M+LYQ9KzGmx/KmxBKOUL3qgWAFkI/dMiNFbDK68Gyl7OHqG8SMMxFpQ87t3IY AP+xcr4EIhqc4SuFqVxN41jACtNS/aA2Q+ctHAZy7BG28m7bmNR0mkmke8yq8TGGotMH zCp2l3tvXJ6Cz/G+xXNLSQFaSydgR7Rph9bp8NZ3ZaWr3Oz6KHMfPbFvd7z43duoE2Ea 506+933CVHAyfMngWOMK4OhNecsdWTJYej4I5V6YPbiUBMxPhVVl1WkdJZ0qrUpArDuo JIUg== X-Gm-Message-State: AOAM533R11lexkQu2xDZBcYkF7bB7JqGZQYD1RSvpOWI+G4YwcSKImB0 s8pnF5yc8fA+GvHYTmcnCD6A6F3qs+khCYUivslpiQYfWHj88c1OXDBxWoONBNr7kmNtR5sbSTK MvVhWXnAgqCxDxQYRy+k3/gVunCWySIr1P37d1B4K X-Received: by 2002:ac8:5ad0:0:b0:2f3:e37a:e768 with SMTP id d16-20020ac85ad0000000b002f3e37ae768mr50097551qtd.592.1654066435028; Tue, 31 May 2022 23:53:55 -0700 (PDT) X-Received: by 2002:ac8:5ad0:0:b0:2f3:e37a:e768 with SMTP id d16-20020ac85ad0000000b002f3e37ae768mr50097535qtd.592.1654066434799; Tue, 31 May 2022 23:53:54 -0700 (PDT) MIME-Version: 1.0 References: <20220526124338.36247-1-eperezma@redhat.com> <20220526124338.36247-2-eperezma@redhat.com> In-Reply-To: From: Eugenio Perez Martin Date: Wed, 1 Jun 2022 08:53:18 +0200 Message-ID: Subject: Re: [PATCH v4 1/4] vdpa: Add stop operation To: Eli Cohen Cc: "Michael S. Tsirkin" , "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" , Parav Pandit , 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.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_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 Wed, Jun 1, 2022 at 7:35 AM Eli Cohen wrote: > > > From: Eugenio P=C3=A9rez > > Sent: Thursday, May 26, 2022 3:44 PM > > To: Michael S. Tsirkin ; kvm@vger.kernel.org; virtualiz= ation@lists.linux-foundation.org; linux-kernel@vger.kernel.org; > > Jason Wang ; netdev@vger.kernel.org > > Cc: martinh@xilinx.com; Stefano Garzarella ; marti= npo@xilinx.com; lvivier@redhat.com; pabloc@xilinx.com; > > Parav Pandit ; Eli Cohen ; Dan Carpe= nter ; Xie Yongji > > ; Christophe JAILLET ; Zhang Min ; Wu Zongyong > > ; lulu@redhat.com; Zhu Lingshan ; Piotr.Uminski@intel.com; Si-Wei Liu > wei.liu@oracle.com>; ecree.xilinx@gmail.com; gautam.dawar@amd.com; habe= tsm.xilinx@gmail.com; tanuj.kamde@amd.com; > > hanand@xilinx.com; dinang@xilinx.com; Longpeng > > Subject: [PATCH v4 1/4] vdpa: Add stop operation > > > > This operation is optional: It it's not implemented, backend feature bi= t > > will not be exposed. > > > > Signed-off-by: Eugenio P=C3=A9rez > > --- > > include/linux/vdpa.h | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > > index 15af802d41c4..ddfebc4e1e01 100644 > > --- a/include/linux/vdpa.h > > +++ b/include/linux/vdpa.h > > @@ -215,6 +215,11 @@ struct vdpa_map_file { > > * @reset: Reset device > > * @vdev: vdpa device > > * Returns integer: success (0) or error (< = 0) > > + * @stop: Stop or resume the device (optional, but = it must > > + * be implemented if require device stop) > > + * @vdev: vdpa device > > + * @stop: stop (true), not stop (false) > > + * Returns integer: success (0) or error (< = 0) > > I assume after successful "stop" the device is guaranteed to stop process= ing descriptors and after resume it may process descriptors? > If that is so, I think it should be clear in the change log. > Yes. It's better described in the changelog of vdpa sim change, maybe it's better to move here. Thanks! > > * @get_config_size: Get the size of the configuration space i= ncludes > > * fields that are conditional on feature bi= ts. > > * @vdev: vdpa device > > @@ -316,6 +321,7 @@ struct vdpa_config_ops { > > u8 (*get_status)(struct vdpa_device *vdev); > > void (*set_status)(struct vdpa_device *vdev, u8 status); > > int (*reset)(struct vdpa_device *vdev); > > + int (*stop)(struct vdpa_device *vdev, bool stop); > > size_t (*get_config_size)(struct vdpa_device *vdev); > > void (*get_config)(struct vdpa_device *vdev, unsigned int offset, > > void *buf, unsigned int len); > > -- > > 2.31.1 >