Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3983843ioo; Wed, 25 May 2022 12:07:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8ssioW0HYL+0r1PvCrWLs8+Pnsrfa15cciXqrpxhi3pW7g12LnWvPeJVC4H64OCVYz4Fj X-Received: by 2002:a63:5fcf:0:b0:3f6:298d:e2ea with SMTP id t198-20020a635fcf000000b003f6298de2eamr30542339pgb.561.1653505640243; Wed, 25 May 2022 12:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653505640; cv=none; d=google.com; s=arc-20160816; b=K6vL627Ap8OCohfm/y/2X2Apfe1GM7UhbQ0GaEZ2zv5yKlals6wWSiI51of5dYnPKH uQPWIwoCuPLfSjzI/3pORUpbLQCOaeLNU3sXFisKFe5RfKJABxvS8KreGDoMw7zTkAfb 7S41h8XbJI4ES16JGGSUe0r4FOJt9/cdZtRma7QjA/1sltlGLDv6JfDkdvmsb/bT8P7W mBEOLb7S5aXD3j64yUdep6ge98ILqwHhAfw0wA33mI68beqOAN5ItiW9y/GKvY+Bg8MV RV20xFIdGswntBMtndp54+A9x8UE693/G7kvq7BI5Y4henQhn58CA5gYYHi5rX+NwnlW MS7w== 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=ctFWOvjzlHkz0hO3oN0UvYyG4Otan61aG5Km/j6XFO529647z1bX702LWw+lK5n28Z kofkbF51ZQ9F9hcOTktGYRgFdn7iv6jrzJevS+EU7nrFIvOCFGKNFkjsLbGheUxsj6Sv 33PenC9sq2YDHi9ibp49eQ1/PBB7ArFnHE2Ou7abkQSxf2G523jvfvbCgI8CVelU+57Q 1I1/4tHDx8GIec06DCuLRLv+W4Vc2gYN7L9598So9Nl7M9zWCvEZfJoKJpxV1o7LhBzg hh10Al1hwnlwduUr8DSLd+WhAL4AVKGSq5ysrp7GTcvpJcheqnDnO1slemwRp18RxNB4 Jw1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ihvn9/HA"; 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 d133-20020a63368b000000b003aaf76cfd76si19360625pga.835.2022.05.25.12.07.07; Wed, 25 May 2022 12:07:20 -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="ihvn9/HA"; 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 S239831AbiEXRGb (ORCPT + 99 others); Tue, 24 May 2022 13:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239822AbiEXRG2 (ORCPT ); Tue, 24 May 2022 13:06:28 -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 D9FA472E37 for ; Tue, 24 May 2022 10:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653411987; 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=ihvn9/HAsksJ3QOxXBSoYK2PfQsZUt+ul1FWA7+hxFOoVFx57jpB0T2abAf3FbM2sw+0Y8 RBHXBWfFN+jFBopxB8gX/rv+XZVAYt9skuQDQJe9YmMxwvJ+WX0qFQsWbR5C0KjyvDw6KE BDHTzKPtrGQt1KVIRROP6PHl7MPa6bk= 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-140-16yW63O5N3qchf5XfyAvpg-1; Tue, 24 May 2022 13:06:23 -0400 X-MC-Unique: 16yW63O5N3qchf5XfyAvpg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E8A83C1E328; Tue, 24 May 2022 17:06:22 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.195.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id C19F22026D64; Tue, 24 May 2022 17:06:17 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, Jason Wang , "Michael S. Tsirkin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Parav Pandit , Zhang Min , hanand@xilinx.com, Zhu Lingshan , tanuj.kamde@amd.com, gautam.dawar@amd.com, Christophe JAILLET , Xie Yongji , dinang@xilinx.com, habetsm.xilinx@gmail.com, Eli Cohen , pabloc@xilinx.com, lvivier@redhat.com, Dan Carpenter , lulu@redhat.com, Wu Zongyong , eperezma@redhat.com, ecree.xilinx@gmail.com, Piotr.Uminski@intel.com, martinpo@xilinx.com, Stefano Garzarella , Si-Wei Liu , Longpeng , martinh@xilinx.com Subject: [PATCH v2 1/4] vdpa: Add stop operation Date: Tue, 24 May 2022 19:06:07 +0200 Message-Id: <20220524170610.2255608-2-eperezma@redhat.com> In-Reply-To: <20220524170610.2255608-1-eperezma@redhat.com> References: <20220524170610.2255608-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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=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