From patchwork Tue Jun 2 02:08:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1302013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49bb793LpTz9sSy; Tue, 2 Jun 2020 12:08:37 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jfwLx-0005Ep-Dl; Tue, 02 Jun 2020 02:08:33 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jfwLu-0005DM-W1 for kernel-team@lists.ubuntu.com; Tue, 02 Jun 2020 02:08:30 +0000 Received: from mail-qt1-f199.google.com ([209.85.160.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jfwLu-0001yK-JV for kernel-team@lists.ubuntu.com; Tue, 02 Jun 2020 02:08:30 +0000 Received: by mail-qt1-f199.google.com with SMTP id n37so12306091qtf.18 for ; Mon, 01 Jun 2020 19:08:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NhXx/Ylc4HmsbcUQ2/+VddzqCTlfyegg6XTDkbMHvy4=; b=bWG1ObmHyTIV+lyQkksU38HiiwVqbz5a9yiN86xzJwFdzqRVlIi6XK9Kh7p8YuU0Sz zSkb/SlntcsFxkrqgG/++GWniZ2/aG/Af5xZSwJN03q8T1V23uHf2qmID8cbO4fIAjcN fEEwfpSjFJk1RqEzon1M0cUkCISm7JxbhfdrpGhE2+Um9uj7Z4oEPK1j2jZQwHSIErPY n6ixKmAaF9uV5iYK+SXOueHCnHkhhpdJO3GjKKFnoe4N0VwOv1ECFTWMhw0OBl1eIzyx KkqhzUOaod8xdam7tDVw+MLZ5vK4GeQu4tqkU35EWhrA1/dvyhpT+tycuoishtK+rJWk 9yAw== X-Gm-Message-State: AOAM5329FOSsX7Lqxa/I+YFvSDv4bLWi54335GkQUKswxyM/dqeLdqFv d+eYteSlbYW2/d5bQg8jmNEI6pRwWGXhPUptEjVrtq8V1QkBVTOFZjf7bQR7LU+MrraTHVg/HlN +RKrDkZD2e20213lT7Wz7i2+3h7I+9BQFTlhx8ck2 X-Received: by 2002:a0c:ffca:: with SMTP id h10mr11074466qvv.238.1591063709199; Mon, 01 Jun 2020 19:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvRCbrIdV5GPzfHrWK5nFo4nklfUMtyKSH9brA75YgnuEZgIWm2x+7ULZXQ00mQ+2KgeKvog== X-Received: by 2002:a0c:ffca:: with SMTP id h10mr11074448qvv.238.1591063708862; Mon, 01 Jun 2020 19:08:28 -0700 (PDT) Received: from gallifrey.lan ([201.82.186.200]) by smtp.gmail.com with ESMTPSA id t13sm1138342qtc.77.2020.06.01.19.08.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 19:08:28 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [focal:linux-azure][PATCH 04/21] hv_sock: Add the support of hibernation Date: Mon, 1 Jun 2020 23:08:00 -0300 Message-Id: <20200602020817.236422-5-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200602020817.236422-1-marcelo.cerri@canonical.com> References: <20200602020817.236422-1-marcelo.cerri@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Dexuan Cui BugLink: http://bugs.launchpad.net/bugs/1880032 Add the necessary dummy callbacks for hibernation. Signed-off-by: Dexuan Cui Acked-by: David S. Miller Signed-off-by: Sasha Levin (cherry picked from commit 2194c2eb6717f2ea7dc793ad9cbf44d359a3f696) Signed-off-by: Marcelo Henrique Cerri --- net/vmw_vsock/hyperv_transport.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index 463cefc1e5ae..db33a412ccf9 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -888,6 +888,24 @@ static int hvs_remove(struct hv_device *hdev) return 0; } +/* hv_sock connections can not persist across hibernation, and all the hv_sock + * channels are forced to be rescinded before hibernation: see + * vmbus_bus_suspend(). Here the dummy hvs_suspend() and hvs_resume() + * are only needed because hibernation requires that every vmbus device's + * driver should have a .suspend and .resume callback: see vmbus_suspend(). + */ +static int hvs_suspend(struct hv_device *hv_dev) +{ + /* Dummy */ + return 0; +} + +static int hvs_resume(struct hv_device *dev) +{ + /* Dummy */ + return 0; +} + /* This isn't really used. See vmbus_match() and vmbus_probe() */ static const struct hv_vmbus_device_id id_table[] = { {}, @@ -899,6 +917,8 @@ static struct hv_driver hvs_drv = { .id_table = id_table, .probe = hvs_probe, .remove = hvs_remove, + .suspend = hvs_suspend, + .resume = hvs_resume, }; static int __init hvs_init(void)