Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp765046ioo; Thu, 26 May 2022 14:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWK82zM+19q03yjN1mfY8JwOcNIscv3/vMIx3x14si+Bs02g25wVzIPr12A7D0+XKcmiNM X-Received: by 2002:aa7:d614:0:b0:42b:f24e:e4c2 with SMTP id c20-20020aa7d614000000b0042bf24ee4c2mr960859edr.322.1653600323897; Thu, 26 May 2022 14:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653600323; cv=none; d=google.com; s=arc-20160816; b=CTbDWW/i7Esf2GjxzLUwHovB37bMkcSR0FJtOfzXgWRdvQ/xwsZh63cLtmfivGfUEk JJ+OXE7NBrRCpKwALCeXT/UizuXpG0zpyNRAzjPMmynAm8l6tTrGG8EGGBmn6hifYRUn 89zJGoQmlAxEVJCwwe2Ydf5f397rOMx5V2qFxKvIMwCyLoSnBOCOCIoowP5MvsSq2j/M t7cpk2UouGY0vqfXaS2db06Sqysdb3mDcRf/ceXqvIhJRecVc1sV2zXfP8dENGGYN2Ef d8W777rmYmyn2JTqtmOGaMXmjVcCiVyErOcgQq/DANwhe0qXpyX6LUJjejSiYlpGrzJ2 Q5Hg== 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=vRnMTw1LMh4vh2dXRWtxuDV18NABDqPs00iKd2p6PFQ=; b=lyyd+fbNP01l6xV7nNsySSrzjlWZhsExdWFN7FaKN4iGU4WKrhNakncztQp+g3i/Uh wn/PhczEvYUH7evVhhFGZBz4o5tpCQoBHkWsruaXM/Ms5KPRDWmkVKlus/t2tJ/92qao njQQ1ZFwXORYOGdSjsLmNr6rNcd+StplW1BxHAJ8t1V56qushYPl3ljzOXLZ78ww6FeU u0xFAdQDou9rB8uTmF/3WPNZclvaEkbYrg4PyWu3sZiPyfYNTwsniLTVTx0sDANYq2nu ayAiriNZvYijUGWFquj6leoiXborOMVUKTwdScnoC0yvEhSpr2poNfWnkZydHj069W9E 6M4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NYFKrapZ; 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 i11-20020a1709064fcb00b006fe1209e97esi2648545ejw.740.2022.05.26.14.24.48; Thu, 26 May 2022 14:25:23 -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=NYFKrapZ; 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 S1347389AbiEZMoD (ORCPT + 99 others); Thu, 26 May 2022 08:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347302AbiEZMn5 (ORCPT ); Thu, 26 May 2022 08:43:57 -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 5DB3A6D86A for ; Thu, 26 May 2022 05:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653569035; 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=vRnMTw1LMh4vh2dXRWtxuDV18NABDqPs00iKd2p6PFQ=; b=NYFKrapZn7eSklhQynjEjKWV2+511dTSRqhnd2gHZ3cU8Jp/udL6fXdc4zE0XCviB5YwHd QbkLoW4D8WW4sWL+ORJXfNix4q7op9hFWk9pGmPLdtH/rKkhiKbJ9yOK23a4lsil+JSMq2 txve7ppggnw9IkE3zWoVZOzwDYdctr0= 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-327-90Qe90GOMxuIWkcWf5pwwg-1; Thu, 26 May 2022 08:43:51 -0400 X-MC-Unique: 90Qe90GOMxuIWkcWf5pwwg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E361B3C1902B; Thu, 26 May 2022 12:43:49 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.194.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E85740CFD0D; Thu, 26 May 2022 12:43:45 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jason Wang , netdev@vger.kernel.org Cc: martinh@xilinx.com, Stefano Garzarella , 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: [PATCH v4 1/4] vdpa: Add stop operation Date: Thu, 26 May 2022 14:43:35 +0200 Message-Id: <20220526124338.36247-2-eperezma@redhat.com> In-Reply-To: <20220526124338.36247-1-eperezma@redhat.com> References: <20220526124338.36247-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_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 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.31.1