Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp262084pxk; Wed, 9 Sep 2020 04:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaM2wp/xfFI1yVBCCaPgbQ5FKNSfoiuLavuFqebaGLqJJrq75SGj/ixaes3HsUBfSsoZry X-Received: by 2002:a17:906:c18e:: with SMTP id g14mr3335571ejz.416.1599652324183; Wed, 09 Sep 2020 04:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599652324; cv=none; d=google.com; s=arc-20160816; b=RHVjpg36ug1azpkGsVPi0lod4NU0PAI9wdGJPlB8o3nxittXbgaHG4MOzqztwcNNIf swAgM/eTDNtUoG1uTW103Og/nHIutYWWThYqBb+rdriyFUyah8/b634d7hjhrlGA/5yo ZMITmBKudNa9LhAQ66a3Nf6XcrFbMfZVpEVdVD8ooknV+32zv2EzoSjD0N2HEWWH9zUB Mux26ir9CvuucSoHEe2+zpCURamSnhxPUUl73hEgfqZ3a+E1JnhmF+tGdRexZ+Rk4ZtQ m+4fleo3M1rn1uq7fSwPMFN1c51Liw+l8WZzaQwNGpFOY1FfoFco4dVG5o7Q2szCOfpW ivow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WXoG8q5ed4XfWQ3Dzmu5hYVDZuDpMKCum26BXIBxJ60=; b=1BkYGjxD1mXJNd1gUGmGWybaWuap4dM4f9kR/TsMPT/O9j/aVZ8THWaF8d2usGxG83 bhH6nl9jjAZ0uZ3+C1eVIj6vzpS+/3Pdf148JrM5CUN1vc+flofvn5dS4hYfo4HQtXBB sf4HmSF37mUmz/uv7NGlkdQk7ckM3KQWoFrfx+uSiA7HKndXTYQHeqKCsMNBnRR7D7gR saW3UjwjFVxYB+XdEda7hzLCSy0uqVtTtTlHODMsMblxDsF+uDfi+sIbw+XmYGnkzBh7 VEWTpHTAhEuTTJ4WCzY+JkjtmoBBvK4cQ7aWv/fm5jAtHcKEG6AF3ptriQRGWsHuwRyc 2Juw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck10si1243684ejb.167.2020.09.09.04.51.41; Wed, 09 Sep 2020 04:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbgIILu4 (ORCPT + 99 others); Wed, 9 Sep 2020 07:50:56 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33002 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729305AbgIILpZ (ORCPT ); Wed, 9 Sep 2020 07:45:25 -0400 Received: by mail-wm1-f66.google.com with SMTP id e11so1658418wme.0; Wed, 09 Sep 2020 04:45:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WXoG8q5ed4XfWQ3Dzmu5hYVDZuDpMKCum26BXIBxJ60=; b=Dxgh49/fpUtpYueRVoJ53/eHoZkjHiSdzsoIwFf6J2MLCAoBQTM8tE/keaLpaXqYNQ SHzXHY7sso7M4FVK23KmUAUggnYJZxIEvIyGe1iZaE5znKgK5+6NcBlZT/kxnn6bkN+i YPb7ht3We1KNPrusjcIzf0f0OCFNEsu38Sdotms7OAy0HylMjztbfx3+nEkGfEbw9jkI QU81ObXohN3WoMaB3lko3t/zl4VE7W2ynAepFBuleI3iHqasnPSUnk7tnOmnKGiKvAgb SxmelVs1Rf3hMb3bmdNHgz2bmn1r0pD1N6KafhUC0aFA8mqNxt5FBRmyrD00E8OoD6KH u+fQ== X-Gm-Message-State: AOAM532zgbw4p1ea0K5acka9ETS3Vn+ieneEd5BVfuHeYzclsafgM8Rc ZJjM3RVD6FtnibfcQ386D2Yi3hULWkE= X-Received: by 2002:a1c:2403:: with SMTP id k3mr3029102wmk.153.1599651480007; Wed, 09 Sep 2020 04:38:00 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id d3sm3720722wrr.84.2020.09.09.04.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 04:37:59 -0700 (PDT) Date: Wed, 9 Sep 2020 11:37:58 +0000 From: Wei Liu To: Michael Kelley Cc: Dexuan Cui , "wei.liu@kernel.org" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , vkuznets Subject: Re: [PATCH] Drivers: hv: vmbus: hibernation: do not hang forever in vmbus_bus_resume() Message-ID: <20200909113758.7ucufasongrttxdw@liuwe-devbox-debian-v2> References: <20200905025555.45614-1-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 08, 2020 at 09:05:34PM +0000, Michael Kelley wrote: > From: Dexuan Cui Sent: Friday, September 4, 2020 7:56 PM > > > > After we Stop and later Start a VM that uses Accelerated Networking (NIC > > SR-IOV), currently the VF vmbus device's Instance GUID can change, so after > > vmbus_bus_resume() -> vmbus_request_offers(), vmbus_onoffer() can not find > > the original vmbus channel of the VF, and hence we can't complete() > > vmbus_connection.ready_for_resume_event in check_ready_for_resume_event(), > > and the VM hangs in vmbus_bus_resume() forever. > > > > Fix the issue by adding a timeout, so the resuming can still succeed, and > > the saved state is not lost, and according to my test, the user can disable > > Accelerated Networking and then will be able to SSH into the VM for > > further recovery. Also prevent the VM in question from suspending again. > > > > The host will be fixed so in future the Instance GUID will stay the same > > across hibernation. > > > > Fixes: d8bd2d442bb2 ("Drivers: hv: vmbus: Resume after fixing up old primary channels") > > Signed-off-by: Dexuan Cui > > --- > > drivers/hv/vmbus_drv.c | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > Reviewed-by: Michael Kelley > Applied to hyperv-fixes. Thanks.