Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5992186iog; Thu, 23 Jun 2022 09:09:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sqGq5WmbPmZLxyiK/l504IwTtDasRoMpkYAp+BTO1JZGHBMsmSwG2wSpJ0mSpPYKajI0Uq X-Received: by 2002:a17:90b:3909:b0:1ed:1202:32d3 with SMTP id ob9-20020a17090b390900b001ed120232d3mr2639405pjb.233.1656000590191; Thu, 23 Jun 2022 09:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656000590; cv=none; d=google.com; s=arc-20160816; b=VTzARojs2YsER0TdcCoZsaiCs2UlyTLAuQoTNT7f3hVZ5IA39o+PldBtwbplc1K+ar V/4LLr4ljTbWqtoBj/3jDGbyjy2dVwSgosrFPDN7+OBrsAAuD1b8pWeUN31VOnKkihem zmEXW3mwCCPzJBiuJdlo2zZJzfHRG8wpImK6KwI1Jc2M0VJlML0mxycnCQzt2nMI6lQR ukAnK+8gK1iDog+tctzNUgpUC3E/GPHZVoqn3+YE9R8VQeezkTPNmmMp467ziEFBxSiz 2xarg0Tdguyza7oSU+4bRJ2htGcfgLeIEkoK1jrNIUPdcvd5aIDtFVddHJIhP8aas3aJ iYGA== 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=jDSWGezRUNkQrAnDbfXcTDGQ0dqeSGuiydbEoBFc/3I=; b=Rckoz0j9ZfI3Zf6fPKIhxXRr5DMsMfDujO4+fmevQEy3w7Zzb9sR+N9YIOUYgWG1aP jf037/hvnqQyUEy6USnh1Jjj8TDFH7XMwSeTkGzjrSXUgvBoD0RH9+4cUTl0SQonGM1q QmNA+0WhZAu9tlKr35y7n+fPcJ7hN1n1hzvPhxzLKIPmYWRXJxNaU3yCXdJreWCt5v8f 5eah/pXqSou2sXUwlDOV7AC8L7IHbALinofLwrNK/kvBcgMe9qLAEpHHMsgG8PN3pgwp 9m0CGNarmspuQdUzCFoeYQ+wTtHrh3zpTeNez8QpkBkg9DVMlAYZoL/UgNJSZpnOhVCw qxcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Su1mK0Pq; 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 rj10-20020a17090b3e8a00b001e895fed1e2si3802296pjb.130.2022.06.23.09.09.36; Thu, 23 Jun 2022 09:09:50 -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=Su1mK0Pq; 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 S232166AbiFWQIB (ORCPT + 99 others); Thu, 23 Jun 2022 12:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbiFWQH4 (ORCPT ); Thu, 23 Jun 2022 12:07:56 -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 2DAA0FC6 for ; Thu, 23 Jun 2022 09:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656000474; 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=jDSWGezRUNkQrAnDbfXcTDGQ0dqeSGuiydbEoBFc/3I=; b=Su1mK0PqqSTbEy3XxRsjMOqUxCallOhTCpED+SPIabrjrkoAmBl1mK3dYzTDI11WY6+6LV ZSOXajldLy/oS6ANtbGaIIqT4gNAfyK7XTehgRuUblzRkDOmEZZyHXGoFUm2m6b2uHMkmg 8c2dgFJq/d3gcO3UpT+/8nKB7aoUk68= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-490-un5L0Dl3OjyiMOvnfTqbhA-1; Thu, 23 Jun 2022 12:07:51 -0400 X-MC-Unique: un5L0Dl3OjyiMOvnfTqbhA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1514718E004D; Thu, 23 Jun 2022 16:07:50 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.194.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id A14B82166B26; Thu, 23 Jun 2022 16:07:45 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: netdev@vger.kernel.org, Jason Wang , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, "Michael S. Tsirkin" Cc: Parav Pandit , Christophe JAILLET , lulu@redhat.com, tanuj.kamde@amd.com, Si-Wei Liu , Piotr.Uminski@intel.com, habetsm.xilinx@gmail.com, gautam.dawar@amd.com, pabloc@xilinx.com, Zhu Lingshan , lvivier@redhat.com, Longpeng , dinang@xilinx.com, martinh@xilinx.com, martinpo@xilinx.com, Eli Cohen , ecree.xilinx@gmail.com, Wu Zongyong , Stefano Garzarella , Dan Carpenter , hanand@xilinx.com, Xie Yongji , Zhang Min Subject: [PATCH v6 1/4] vdpa: Add suspend operation Date: Thu, 23 Jun 2022 18:07:35 +0200 Message-Id: <20220623160738.632852-2-eperezma@redhat.com> In-Reply-To: <20220623160738.632852-1-eperezma@redhat.com> References: <20220623160738.632852-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.6 X-Spam-Status: No, score=-3.4 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 7b4a13d3bd91..d282f464d2f1 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -218,6 +218,9 @@ struct vdpa_map_file { * @reset: Reset device * @vdev: vdpa device * Returns integer: success (0) or error (< 0) + * @suspend: Suspend or resume the device (optional) + * @vdev: vdpa device + * 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 @@ -319,6 +322,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 (*suspend)(struct vdpa_device *vdev); 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