Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11668162rwl; Tue, 3 Jan 2023 03:00:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXtQlGrCRdSW4lgSrpkRqF7yZ17oopZ8cwncnJZ4fQfb9OVqs4HLLpPDIbZSZWQMUUAcaOP8 X-Received: by 2002:a05:6a20:8ee1:b0:ac:3f3f:9fbd with SMTP id m33-20020a056a208ee100b000ac3f3f9fbdmr44209909pzk.48.1672743641102; Tue, 03 Jan 2023 03:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672743641; cv=none; d=google.com; s=arc-20160816; b=wgq8Nehdh5c7ShrjTxoOVWI0uGR5TdEfbWn0Le60f+DaG/PKMHndIAYwolV6u5mj1+ 55xIiSBK/FS/A8RRR9dJ55hIT3aLYFpqjgMQTWZD6MljjjZ2UiYNrlsXsm/uc6vN0Lry AVGqTvAmPA9DuopRVQvzGqUShFoBpDE4r6Xu61BVNd+MsFqco4cM6GXtTas7A97OUuMp 69rNnHjUMsjhemBOhwcGaQEVuElY+OKbBh5AHiqKBjdvOuyYuvG57/LvUY1Gafi7Fgcb sBXc2FurqcZRgWhdiFxpUdjpaq/iN/Ya7n9Q/zlPxpBaeEbzbhGQ2lsTb2PySTN0hOtz xjVQ== 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=QLNHna+NJ8rzmbixv6xgH1RchkjZLS4f6MLf1dXszbQ=; b=bxo92uhzKcw/AV/XalGB3b0XP817wkf3EAT3yzcUdRrCPrzgpNSbxDK9/tVopSXsdR 47nnY9NOLnDlp8poxALEeKvUp230nE3jNnccPyVZQmEjVoEFD+DINq6+pvAOiccuVIfM IGc4qM5sjoDrwkWvjvyCEVg5CUWcll4+bxVqaJRnSFDdQKL/Ie42qzZ0T96sFXGwJ87p jevg/xKremsSND0Mqdf+vT4NQTTEPPjvv8Fw1Q64HhzUYBEVQUhmui6mzrsIRwv+Bd8p Cd8kFcWl2pHrIcfaglu+3jLhLHigDVlolu7lPEOoWTe89rtGFNUo4/+1Uh08vxXyu/uZ UghA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zfx7MmkX; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a630f07000000b00479139fe810si33368635pgl.619.2023.01.03.03.00.31; Tue, 03 Jan 2023 03:00:41 -0800 (PST) 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=@intel.com header.s=Intel header.b=Zfx7MmkX; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237322AbjACKwE (ORCPT + 62 others); Tue, 3 Jan 2023 05:52:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237108AbjACKvc (ORCPT ); Tue, 3 Jan 2023 05:51:32 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05AD0DF3 for ; Tue, 3 Jan 2023 02:51:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672743092; x=1704279092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zukvlO7ayucX1PyDrSkH1p1yDhKXLf7pZ9ViBv268Sg=; b=Zfx7MmkXB6gpkVmIK0PPGoas+8IDi5c5KLumkTL15In6DhDp1zjNISWW w2CTV/CbL5mjgMnlgEHDoSxCQita9fcfuLDoZDLJ5X1g8r/8TtB7Mx/Km 9yKwiuiAccEYcBXW4L8KSo5IjHlegswPC/xAM1B361wRuy323i/1gMDHX mwlGjaGSnBAqxj5/w5ImVRmYybvUOvy0b6RPod3dTHpDsGGVlNY8RjKUH j+muTGxsEmm26BZiLFF7H+L+dMEEouenc/Ch2PncspqeW5hRcN0Qf+U84 g/6iajpHY0xdZ3cFv5xoEDRdIW32mmFodu97PrdI8oWF3ZSMOl4gNCkMn A==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301318433" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="301318433" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 02:51:31 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="604772656" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="604772656" Received: from isobansk-mobl1.ger.corp.intel.com (HELO sboeuf-mobl.home) ([10.252.24.246]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 02:51:29 -0800 From: sebastien.boeuf@intel.com To: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: mst@redhat.com, jasowang@redhat.com, eperezma@redhat.com, sebastien.boeuf@intel.com Subject: [PATCH v6 1/4] vdpa: Add resume operation Date: Tue, 3 Jan 2023 11:51:05 +0100 Message-Id: <6e05c4b31b47f3e29cb2bd7ebd56c81f84b8f48a.1672742878.git.sebastien.boeuf@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LOTS_OF_MONEY, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE 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 From: Sebastien Boeuf Add a new operation to allow a vDPA device to be resumed after it has been suspended. Trying to resume a device that wasn't suspended will result in a no-op. This operation is optional. If it's not implemented, the associated backend feature bit will not be exposed. And if the feature bit is not exposed, invoking this operation will return an error. Acked-by: Jason Wang Signed-off-by: Sebastien Boeuf --- include/linux/vdpa.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 6d0f5e4e82c2..96d308cbf97b 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -219,7 +219,10 @@ struct vdpa_map_file { * @reset: Reset device * @vdev: vdpa device * Returns integer: success (0) or error (< 0) - * @suspend: Suspend or resume the device (optional) + * @suspend: Suspend the device (optional) + * @vdev: vdpa device + * Returns integer: success (0) or error (< 0) + * @resume: 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 @@ -324,6 +327,7 @@ struct vdpa_config_ops { void (*set_status)(struct vdpa_device *vdev, u8 status); int (*reset)(struct vdpa_device *vdev); int (*suspend)(struct vdpa_device *vdev); + int (*resume)(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.37.2 --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 5 208 026.16 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.