Message ID | 6e05c4b31b47f3e29cb2bd7ebd56c81f84b8f48a.1672742878.git.sebastien.boeuf@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4548255wrt; Tue, 3 Jan 2023 02:53:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvdPuqov9INHU+YUn0cHBoFz2JD1EGkKMiPaKbgbu5ygivX5sC3s9jWbCA3+/SBZ7a1Rti X-Received: by 2002:a05:6a20:2a96:b0:b2:5cf9:817b with SMTP id v22-20020a056a202a9600b000b25cf9817bmr72104604pzh.5.1672743188904; Tue, 03 Jan 2023 02:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672743188; cv=none; d=google.com; s=arc-20160816; b=oek2c849s4E++8NStJVMbGJNYlZrOCAS3iiPqR7sshLhzAWoZ87TPFupRnhandbdtc o2n7TokYQAust9tppeqrU6aQ679k5EYs/1/iavKQdT9OrQrPKDmHWUYq+pOLCIbRqvKn lJlSXkzA3x9ybHPYocqaCgrxHIN5O2wY/6Yh8H0zeq0yMOvXX0/+5wZB2h6rOe68vjvR m1KIPJVLyFZdpXHwXBVqNTvfLdz7ie88OJIqR4/9BveKsW4268ZZXvxufRiGsBqlJJfN GkUzk1+R2q5oSGyBxyLPZc3wb1FAkSsr662GV7AM2xMbv81P2aOuCJfOHXKPk4mxYN1h 9JYA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a63db4a000000b00463e9f26c48si32745373pgi.177.2023.01.03.02.52.53; Tue, 03 Jan 2023 02:53:08 -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 <rfc822;tmhikaru@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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: <cover.1672742878.git.sebastien.boeuf@intel.com> References: <cover.1672742878.git.sebastien.boeuf@intel.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753998358004978159?= X-GMAIL-MSGID: =?utf-8?q?1753998361990250274?= |
Series | vdpa: Add resume operation | |
Commit Message
Boeuf, Sebastien
Jan. 3, 2023, 10:51 a.m. UTC
From: Sebastien Boeuf <sebastien.boeuf@intel.com> 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 <jasowang@redhat.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> --- include/linux/vdpa.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On Tue, Jan 03, 2023 at 11:51:05AM +0100, sebastien.boeuf@intel.com wrote: >From: Sebastien Boeuf <sebastien.boeuf@intel.com> > >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 <jasowang@redhat.com> >Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> >--- > include/linux/vdpa.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> > >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. >
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);