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 D57ACC433FE for ; Wed, 25 May 2022 11:00:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241949AbiEYLAI (ORCPT ); Wed, 25 May 2022 07:00:08 -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 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