Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp419421rwb; Wed, 10 Aug 2022 10:17:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TX7q4w7U8JVONOBPt6b0gbq7CBhVZ3MaXHniKqjNiY8BcXK22IItTPJw93kgpiAKYbkxg X-Received: by 2002:a62:1c81:0:b0:52f:ccb5:9de1 with SMTP id c123-20020a621c81000000b0052fccb59de1mr6535243pfc.45.1660151829720; Wed, 10 Aug 2022 10:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660151829; cv=none; d=google.com; s=arc-20160816; b=dhI4Ok0qribPEs3ILH44EGFBIKMbgfpEE6KyD+o4pk4GcqNB9h7lwY08LtTFMpntxT RoyDIW8BSc5w8OwqzK7myXShBOJ6Tz6sozu/kAqkbULs88B1i7hg7c3SQyaBokiG7JaB AOGDLEHOdIAzH4AeyMWkOmxoMXgf5mlA0uoqbt+ldn58xq3P0fEXmoHTEIBck1qOk7OS tR9/qQKSU9PyxW9rn1eLWZrSjgmeV7dKHJFXO1eWFCeXUEfgfkRJNOdrC4NySwSnN6pn iYqz+O9yMJ52B+XqgTR19MvuyehtChwb2MpNrk9hsMnPdfU45HAOIx0som5b5f+ZRwJt D9Lg== 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=i3xMckH4pXPfYRScm/pgwCzvro6+t56bA2voo3F7GcY=; b=fsJlHupDo3LpAKFLbMTTUQDh1RWgw0VwTE6MeqKynUdbnaNFzCsAG4dwrc9hN4KbWX x3avR0AYRagu0MyixOJemiRinArgHqNnMMU5dubKTOxeBzLKUaQeMxCyxVH89DqtVRYa DlTvQNtcNkopSEBJBDui+gdotae20gvha5v0OTumI203w9faktWQlmSZ8ROHXR+VZnaB BvfXU1g7zju2FsKnEaoDX1Ra3Ke2y8eBOSvTlxKfyzFUPOT86US+135S+uHobnqjTVpb 7pX626kk2EybBTvSEOleLWpUz0pTaEFN+RVC3+uCXaAx0GPc1xk9qS362O+wd3Ph4X3U cmSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hJkRLOfI; 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 h7-20020a056a00230700b0052f2e8e78d4si3405196pfh.139.2022.08.10.10.16.52; Wed, 10 Aug 2022 10:17:09 -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=hJkRLOfI; 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 S233413AbiHJRPp (ORCPT + 99 others); Wed, 10 Aug 2022 13:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233414AbiHJRPe (ORCPT ); Wed, 10 Aug 2022 13:15:34 -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 0A16C79689 for ; Wed, 10 Aug 2022 10:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660151732; 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=i3xMckH4pXPfYRScm/pgwCzvro6+t56bA2voo3F7GcY=; b=hJkRLOfIhEPLVq12vdldreNVHJ/sgNkc4VZOCzA5N9EfC5yRhLn39F89OHQccHBIqG/reJ FoRU67JX8Csv3xKDgWsxZbnU4HUhY4DtGLOgH36r8KEy/DKhS67kTAruPai8j6KjK7m5Go qvBw8rTTV68/cfTjsAqWgk+JexIYOx0= 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-649-QocaGs_zPLKxQQ1TirQ3-w-1; Wed, 10 Aug 2022 13:15:25 -0400 X-MC-Unique: QocaGs_zPLKxQQ1TirQ3-w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9FF1C1824600; Wed, 10 Aug 2022 17:15:24 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.193.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id C791E1415128; Wed, 10 Aug 2022 17:15:19 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: kvm@vger.kernel.org, "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Jason Wang , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Cc: dinang@xilinx.com, martinpo@xilinx.com, Wu Zongyong , Piotr.Uminski@intel.com, gautam.dawar@amd.com, ecree.xilinx@gmail.com, martinh@xilinx.com, Stefano Garzarella , pabloc@xilinx.com, habetsm.xilinx@gmail.com, lvivier@redhat.com, Zhu Lingshan , tanuj.kamde@amd.com, Longpeng , lulu@redhat.com, hanand@xilinx.com, Parav Pandit , Si-Wei Liu , Eli Cohen , Xie Yongji , Zhang Min , Dan Carpenter , Christophe JAILLET Subject: [PATCH v7 1/4] vdpa: Add suspend operation Date: Wed, 10 Aug 2022 19:15:09 +0200 Message-Id: <20220810171512.2343333-2-eperezma@redhat.com> In-Reply-To: <20220810171512.2343333-1-eperezma@redhat.com> References: <20220810171512.2343333-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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=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 Message-Id: <20220623160738.632852-2-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin --- 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