From nobody Tue Nov 26 12:39:17 2024 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F54218028; Fri, 18 Oct 2024 11:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729252699; cv=none; b=GEbnLvst88FGoPQV9hqaJ1ySHZOBiWy2xfkklwnHVc06h2+6A7YR6/OWpcNPz0DO0R5J/aKtjf22lWmeUEGZitrsaegdrnACIJjOJMkLJG4LfLwmHOI/nl5xB5QbsLBKeWTAjoFagbyRZ0dBbe3YNQMw6VP82K06h/Jd4ZqYp/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729252699; c=relaxed/simple; bh=V7l0PvQcRAyt31Veefu5777dqgXNHKMi1nxNw1VdZ0s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p8JeWHL24AsJbAxfZFroufdSHKSpVSgxaMdUInNxhm/YSfXRHKYgEqG3ES2FRSTvmLrsXKdFYSiZSIayUP0DwBEE4LLz6NxpwZsfar8wRZDwDCWw6u9Gx5OMLH9N48Z4bhDn/4YiOL/Rc7iprh1licYZihSBJ5ZzUJln3Wrv+tA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=qIpl0s3B; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="qIpl0s3B" Received: from namjain-Virtual-Machine.corp.microsoft.com (unknown [131.107.147.150]) by linux.microsoft.com (Postfix) with ESMTPSA id 3358220FE9B9; Fri, 18 Oct 2024 04:58:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3358220FE9B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1729252698; bh=AgkvXZDH7v1BFpc7/7o0bMtbqPdIJtAQPe1CUK+wbLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qIpl0s3BkG1bDpFcsFn13Y47VOv7Z+PlB8pvGEYmWW9Y5nYX5PXVHFrrIb6Glx6Bn Gw4pKyIPeCW8Vgxyt1ja/50KioS0Hr6shaCJ3VUnSumATV54SQQlKzMPqeaP+YPVZn vYHpYbWB5pr03/CYhlhR1lih/rexTpDgrsivsTJM= From: Naman Jain To: "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Naman Jain , John Starks , jacob.pan@linux.microsoft.com, Easwar Hariharan Subject: [PATCH 2/2] Drivers: hv: vmbus: Log on missing offers Date: Fri, 18 Oct 2024 04:58:11 -0700 Message-Id: <20241018115811.5530-3-namjain@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241018115811.5530-1-namjain@linux.microsoft.com> References: <20241018115811.5530-1-namjain@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: John Starks When resuming from hibernation, log any channels that were present before hibernation but now are gone. Signed-off-by: John Starks Co-developed-by: Naman Jain Signed-off-by: Naman Jain Reviewed-by: Easwar Hariharan --- drivers/hv/vmbus_drv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index bd3fc41dc06b..1f56d138210e 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -2462,6 +2462,7 @@ static int vmbus_bus_suspend(struct device *dev) =20 static int vmbus_bus_resume(struct device *dev) { + struct vmbus_channel *channel; struct vmbus_channel_msginfo *msginfo; size_t msgsize; int ret; @@ -2494,6 +2495,21 @@ static int vmbus_bus_resume(struct device *dev) =20 vmbus_request_offers(); =20 + mutex_lock(&vmbus_connection.channel_mutex); + list_for_each_entry(channel, &vmbus_connection.chn_list, listentry) { + if (channel->offermsg.child_relid !=3D INVALID_RELID) + continue; + + /* hvsock channels are not expected to be present. */ + if (is_hvsock_channel(channel)) + continue; + + pr_err("channel %pUl/%pUl not present after resume.\n", + &channel->offermsg.offer.if_type, + &channel->offermsg.offer.if_instance); + } + mutex_unlock(&vmbus_connection.channel_mutex); + /* Reset the event for the next suspend. */ reinit_completion(&vmbus_connection.ready_for_suspend_event); =20 --=20 2.34.1