Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2438101ioo; Sat, 28 May 2022 13:41:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcr3Zf0AM2pUhO4HhFT7046PCsXE44Y1Cv7ClUDqj54XGgQrCCLdZGcv2eqSdozMWCW2LJ X-Received: by 2002:a17:903:1107:b0:15e:f451:4034 with SMTP id n7-20020a170903110700b0015ef4514034mr49101251plh.3.1653770519666; Sat, 28 May 2022 13:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770519; cv=none; d=google.com; s=arc-20160816; b=Uy/y7loZ5uHczBSCG1YEnnxvCKzxPYhCv1zAMhDXuz0hz7pqBqZhZ/B7cEbh4C7wD/ GpjcvxZkswduULy399TtMuJHNzswR52dg1AAXCloEqLaWKIX9E7ZLICDddR2+w2vCuVT LsOjYdUtJ7RE+aOsdNTcTC0caKK5Hu1ms4G+8BtHlltPu2inehwDIGdWE4JKlypSSew9 tFJXjTj4Qh5N0Dqqa3st/ba0IMWWBENhGEe/qm6nn2mTaEPmK9X0PCTF5uJv8y7vsugh smA6eeuZgKE2nLhUDgwd5S9EIKZ4mG3wj92kKrCZGh/OkJ8D0goMZawUKWmmFKCp7CVR eRrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PIs2TnkQYfNX5UnfDwJthJ+utgn6CIbjyk+tWQwa1VU=; b=iTqCsKxixDA5dodGzh4bbJY39uSZeTEZ032AXhzOd5GR2phpKpBEWdiCqYXjnyLCYh r9VYHPp7RD7aQ+Jdux+WR9D+T180mRXCEYNNwr/fzds8BRMeM8uNQAKcAVgQzOg9zULl mU5MrMPcWyd0J4IQ8QgFY2rpLr//HHWYrA3w+FSFbHjDEJ8qZDkBV/O/dZ0txiFCdyV0 4YYOS8OUpiqEsIs7o8Sl/4WUE4bG2PBnEVxERxm/sOPWCcl9S+yrTBo6d4emUmKImOIY mhmU45ZoAy716rqTRI+K3703S6T315Cy44vcqMKaUfGapl91LjMhqepPWfXvOtuYpYQP rHZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LXhuK3e4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lb14-20020a17090b4a4e00b001d949db23b3si8281472pjb.119.2022.05.28.13.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:41:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LXhuK3e4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 F12081B9FBA; Sat, 28 May 2022 12:44:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242222AbiEZOXn (ORCPT + 99 others); Thu, 26 May 2022 10:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbiEZOXe (ORCPT ); Thu, 26 May 2022 10:23:34 -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 C940EC5DB4 for ; Thu, 26 May 2022 07:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653575011; 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=PIs2TnkQYfNX5UnfDwJthJ+utgn6CIbjyk+tWQwa1VU=; b=LXhuK3e4DQT1TfPNgjQITzGr4DXYgZUam0jZVMEb0ZXeHn5v5vTAA+tVT7h5afb7SyyrKw uZhj7dDrYWgb71NX2PA1n5KmQFSe2VzYXmRaTuSzMfkKZZN2/d0AU3lLboutHWFTts7E/Q B6WgySLemdO0sODl9eP52WlMvmFSgZ8= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-362-L_Jj7HwoMHqs87a-n9k22g-1; Thu, 26 May 2022 10:23:29 -0400 X-MC-Unique: L_Jj7HwoMHqs87a-n9k22g-1 Received: by mail-qk1-f197.google.com with SMTP id v14-20020a05620a0f0e00b00699f4ea852cso1464994qkl.9 for ; Thu, 26 May 2022 07:23:29 -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=PIs2TnkQYfNX5UnfDwJthJ+utgn6CIbjyk+tWQwa1VU=; b=OHq58PuBfR4vMog68mIL4D5WloPsk8nUBMQd5d1xsYkN5Tb0gg4KE5u0xVWEFjAdsu 7uWu1SIUR41WIfYG3xK/BY6wThJASnQrNg7ZaGPImkeca7N//kjAoGBg5IXC6gPu0WZ8 ZLL2Cx1J5J8wigpa8NzVLvMPB0F7GpBydYlpWlF9YsC3dud2Q1kfrqKAx2YN6CPMTQ6r fdK5iqMdb+sZbjHHhdoaqjU962aoKjl4K7wcEi5OaxZBQ0CcobNAARuOchc/nvWp7u8m d0rscGBv65pEiv+IZiIJz4J8nJ/Mg8bTcQxDIgp7kPoYO6jK/rgWoLxcUEoORE2TG+Ec lhPA== X-Gm-Message-State: AOAM5317QbEnERbgNLCrRsHqZI8frdX+l9xKfa1V7tTegfab91xLPeTe jBifC3nZ8mUqu2ooaLz4wtTQQ5epfHh0KQcVPT3DRclEEkTNpmx0K1hvHF2YTvs/XNXt2QwEHly 036VNrLT3lN084HrWDWbKr05s X-Received: by 2002:ae9:e90d:0:b0:6a3:28eb:1a4f with SMTP id x13-20020ae9e90d000000b006a328eb1a4fmr25047875qkf.21.1653575009379; Thu, 26 May 2022 07:23:29 -0700 (PDT) X-Received: by 2002:ae9:e90d:0:b0:6a3:28eb:1a4f with SMTP id x13-20020ae9e90d000000b006a328eb1a4fmr25047843qkf.21.1653575009105; Thu, 26 May 2022 07:23:29 -0700 (PDT) Received: from sgarzare-redhat (host-87-12-25-16.business.telecomitalia.it. [87.12.25.16]) by smtp.gmail.com with ESMTPSA id j19-20020ac85f93000000b002f3bbad9e37sm1031494qta.91.2022.05.26.07.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 07:23:28 -0700 (PDT) Date: Thu, 26 May 2022 16:23:18 +0200 From: Stefano Garzarella To: Eugenio =?utf-8?B?UMOpcmV6?= 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, martinpo@xilinx.com, lvivier@redhat.com, pabloc@xilinx.com, Parav Pandit , 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 1/4] vdpa: Add stop operation Message-ID: <20220526142318.mi2kfywbpvuky4lw@sgarzare-redhat> References: <20220526124338.36247-1-eperezma@redhat.com> <20220526124338.36247-2-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220526124338.36247-2-eperezma@redhat.com> X-Spam-Status: No, score=-2.8 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 Thu, May 26, 2022 at 02:43:35PM +0200, Eugenio P?rez wrote: >This operation is optional: It it's not implemented, backend feature bit >will not be exposed. > >Signed-off-by: Eugenio P?rez >--- > 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) Sorry for just seeing this now, but if you have to send a v5, maybe we could use "resume" here instead of "not stop". Thanks, Stefano >+ * Returns integer: success (0) or error (< 0) > * @get_config_size: Get the size of the configuration space includes > * fields that are conditional on feature bits. > * @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 >