From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDB357E58F for ; Wed, 19 Jun 2024 09:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718789409; cv=none; b=u5oXhFm0BOsFn6MNTJ7iAKjfo8PGb/vu2pmB2S28mrYWjyCt0bSghIw5vAlRFlb82gPQ650OnVr587BGEb27KfuapOm5WiaEnqBMFKJdyo6FCDlsKQa0xlhQpTrUPGA5lPKqXXi/tKoE+cOLLoDE0sChwZqtHmGIctMSbfGDMFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718789409; c=relaxed/simple; bh=hNHcBif2YH+bifXw2RHyud9q77Kk7oakdFhIQFTP7v8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m7+L8tG/Hk28feJZafZXspyvoZrBQ3TNKrV0vXfFurbnHuRmjpPyFBCYk2AUerXxzdg9TNGt9zD1yQgi7NK2GfEesxclNhlsd2vPxzZq4HkzB8c0KMrn2j8RH+weBIi8XC1ype9Zql5ftxCb3waxo8eJ3TCDGpKS+ppOPhnOTKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=D9oY3AON; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SR8z3tw+; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="D9oY3AON"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SR8z3tw+" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C49A111403B9; Wed, 19 Jun 2024 05:30:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 19 Jun 2024 05:30:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1718789406; x=1718875806; bh=kEPoEffS2C Dh8fexHrh1e1lJF7LCd2va187FJwZetro=; b=D9oY3AONBjyEygOPE80ZMKnoyr /aF3Bv2IxaHTS+1K/UzCrmbaiAlPG1JajkaNEVju+cidYr5LFYUvrRc7p9ErW1hv HCCZAdUbf7U8dDd49J0YqOSfVcoZj4258ZJXUFHbtw5BebzLoS7i0b4dsA/O47a0 jeMARsihtw/FsNGPtAK9Wx7U+GEpzxx1T5JYJZ55GDOpZgLn64UhmVFWP/WiQnht 9Ns2P1PJp54OXfuV4q8nspOZdj8FH6MeoLBp83RWoG26FIcAxMY656KTfCWNFQBR BVhdMgZ198P9Gpy9mbfuWRe9No3UAuk5Xk4F4ztNfAl2hcI5evAIJZUx4VWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1718789406; x=1718875806; bh=kEPoEffS2CDh8fexHrh1e1lJF7LC d2va187FJwZetro=; b=SR8z3tw+Y/hUn6PDAnaT5jF4ffBVDRlhiwBiOvtUkaLP F/QRHADSpt8rOSBhVqjCJ9pIuNvcaZ1CqRNmOT8RJdNMy9bMt1b7XniKHeBQHy85 VY97UZEdwMMrV2ZRSnT0dC3hBJiVKIzozNwy2XwkD8SWVy/YkJtuRsqYpwFgY+2U 1UUovyM01eknbDT/jlsaae6wpD2CZ4hva8eDJW60PvH7qFdbNQXSMAbroMKyPW+1 CdhGGIAhsQAokYfX9OnHrQb+CwBVtfz/WuxqQFhc3/jUugNzhfAGGnA71t1Lkc50 GloMONziOjGROLKJp4T9Suxo2CPjpUQFdqJWCG+o9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepgeehue ehgfdtledutdelkeefgeejteegieekheefudeiffdvudeffeelvedttddvnecuffhomhgr ihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 05:30:05 -0400 (EDT) Date: Wed, 19 Jun 2024 11:30:02 +0200 From: Greg KH To: Dexuan Cui Cc: stable@vger.kernel.org, mhklinux@outlook.com, Vineeth Pillai , Wei Liu Subject: Re: [PATCH 5.4.y] hv_utils: drain the timesync packets on onchannelcallback Message-ID: <2024061955-dance-civic-048d@gregkh> References: <20240617232507.488-1-decui@microsoft.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240617232507.488-1-decui@microsoft.com> On Mon, Jun 17, 2024 at 04:25:07PM -0700, Dexuan Cui wrote: > From: Vineeth Pillai > > commit b46b4a8a57c377b72a98c7930a9f6969d2d4784e > > There could be instances where a system stall prevents the timesync > packets to be consumed. And this might lead to more than one packet > pending in the ring buffer. Current code empties one packet per callback > and it might be a stale one. So drain all the packets from ring buffer > on each callback. > > Signed-off-by: Vineeth Pillai > Reviewed-by: Michael Kelley > Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com > Signed-off-by: Wei Liu > > The old code in the upstream commit uses HV_HYP_PAGE_SIZE, but > the old code in 5.4.y sitll uses PAGE_SIZE. Fixed this manually for 5.4.y. > Note: 5.4.y already has the define HV_HYP_PAGE_SIZE, so the new code in > in the upstream commit works for 5.4.y. > > If there are multiple messages in the host-to-guest ringbuffer of the TimeSync > device, 5.4.y only handles 1 message, and later the host puts new messages > into the ringbuffer without signaling the guest because the ringbuffer is not > empty, causing a "hung" ringbuffer. Backported the mainline fix for this issue. > > Signed-off-by: Dexuan Cui Both now queued up, thanks. greg k-h