Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp663310ioo; Thu, 26 May 2022 11:38:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcUpZmZzh9jRpYudq9FBVlPXkXuQaQh2ZEXqFfagEAI+Szh99bIUBr8/unAMwpbh706NcX X-Received: by 2002:a63:2c3:0:b0:3f4:e639:fec9 with SMTP id 186-20020a6302c3000000b003f4e639fec9mr33790415pgc.478.1653590295113; Thu, 26 May 2022 11:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653590295; cv=none; d=google.com; s=arc-20160816; b=IuHgFDIMUN/+q6jlbW+l2117Ry8Q/y5fj+NrFHeUkv3zIUhRYfpYRXPmyBaSPPNQWW CUOxACH7QlYMUFqbQuh9dAI8cE0ia6eASu6RH3pzfCrr8v7lFYzvKeyeo+N3O6VvAtmE O6QYM8tNZ+p7uofOH0oZBC78WMcQSgQAj2pDYwCGeWq7mk0jSIxzpXn7N3w/NZdfdEbO FWcd0ICzLfNBZQV+nnRFYfx0kvL2ITeORQ6/kowASc/3YvQnMXRT9uaxFx9lJlOpy08J oUSTvEvvEKGEyCIGSKOMRUuvx6cqx007phe0FJ8wVr9bOXt1Tfzq/wyihWdfprzU0S+p dtCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ese622/PjwlbZK8BGVrfy4abZ5tLs60liyPxNETnN7U=; b=Id+pxhcoORzkaFHwE5haCQufTtvq2kwn9CDcDqY8QzJKFnDa1LgQC1cagP5SCjuv2z 9KRzSLsq+7Kpp9obSrM+1KwWgZnkLIOsDYp1qyJ3K1P5y30ARXuQXiaLVeHvqu12LOhC HuTewxCH2gM54pSigoiKuF80xgNXhYU+2MmnxOsyNuI23eLO9aaFooSPopJVcCldmtRa izbZioRnvUeTkcDkRlkTKwUlwxH78+x1hsrf/2hxgIp2WrglKK6hLyOR+oWujyCqExCK YAG9fC9c52KE1frFen0lTBfiWvJPaY3ydc5N6r1lj08NAZi0izfiXT+WjNifMEdyD7Hy YSWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JRPrUCo3; 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 c19-20020a170902849300b0015d2ca1afcfsi2471097plo.89.2022.05.26.11.38.02; Thu, 26 May 2022 11:38:15 -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=JRPrUCo3; 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 S242541AbiEYLAG (ORCPT + 99 others); Wed, 25 May 2022 07:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241788AbiEYLAB (ORCPT ); Wed, 25 May 2022 07:00:01 -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 BB57B60BAF for ; Wed, 25 May 2022 04:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653476399; 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=ese622/PjwlbZK8BGVrfy4abZ5tLs60liyPxNETnN7U=; b=JRPrUCo3/Ia7YPUdQ4HGYd7ZXbbWhF7EUrnPeRT+32du3IdhC4+VurEJvnO3TB336KKYyl pHygcgOBAWyQcYsRbfM4Sp4fvUaXOpVWFxrXoD9SDy9a3iwT+8tpvy+s5Q3w7pu4hel004 L9Qk7MIo3qv/4lzXTRvx/MkPLPay9Hk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-54-mAvFaTlVPUyrJ8isaMy3yQ-1; Wed, 25 May 2022 06:59:49 -0400 X-MC-Unique: mAvFaTlVPUyrJ8isaMy3yQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9C601C0CE63; Wed, 25 May 2022 10:59:47 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.192.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57D9D7AD8; Wed, 25 May 2022 10:59:41 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Jason Wang Cc: Zhu Lingshan , martinh@xilinx.com, Stefano Garzarella , ecree.xilinx@gmail.com, Eli Cohen , Dan Carpenter , Parav Pandit , Wu Zongyong , dinang@xilinx.com, Christophe JAILLET , Xie Yongji , gautam.dawar@amd.com, lulu@redhat.com, martinpo@xilinx.com, pabloc@xilinx.com, Longpeng , Piotr.Uminski@intel.com, tanuj.kamde@amd.com, Si-Wei Liu , habetsm.xilinx@gmail.com, lvivier@redhat.com, Zhang Min , hanand@xilinx.com Subject: [PATCH v3 1/4] vdpa: Add stop operation Date: Wed, 25 May 2022 12:59:19 +0200 Message-Id: <20220525105922.2413991-2-eperezma@redhat.com> In-Reply-To: <20220525105922.2413991-1-eperezma@redhat.com> References: <20220525105922.2413991-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-2.8 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 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) + * 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.27.0