Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1207781pxb; Wed, 10 Feb 2021 02:53:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwD0hM7OFnanC4ilZAA14t1hvoGCuc+6WgQt3TUTwYTp/MyKdpCUfYqTLwb8vk6vo8EQwGV X-Received: by 2002:aa7:c911:: with SMTP id b17mr2549902edt.382.1612954400357; Wed, 10 Feb 2021 02:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612954400; cv=none; d=google.com; s=arc-20160816; b=Dbwc+IN10wzSoYVmPtjUvXZlAtKjrdTktfEM9cQwm9F+Ui2vujnU6pshxSkpAFNPgE YjUjDt7qM5gK20ax08IPc5WhwTMrFT9Erit2gNE8aI1rdJslapNP9CXYlT6EAMVA8W8c NQZUHlVJFvYBdCvHYPs9XxmdYL+vwDR1vIiaScOQ8wyHvVVNzRniSu0zfEdt8qeJ0pE5 4bp9Dq0knbVt8aOCxAgadK/kG+ItcqkfPgeT0FCmLj9YCA7OlrGYlyDt+l8XsFR/aUoR PfcHrtDVSp/3Zq0c3rusc3zpdDLymwFbApNkCnvNu9PrMFbLNulfes6qIwxbFUOXmz94 nsAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QwuEvYKJ5O5uwyQULsjlvgwKua/M7GCOt69TkdIZcLI=; b=VYJRmbbWD2l3+4PXakYIP19fkiIAzNg5MncbdKNOtDnyMYuMK3e+clUZ8veL/IMszi 6wGYieVdAD5hpNl3u2ofw4H51OIex5oXx4CgjaXPXR1o9ynm4hNtNsccFr9Fl7TCepB6 tixmQiRE2eRh6UwnWL6Eo6QdRfZ6tWpl4Wa4okm5XXdsfKVrnBXDM9nwzBpCEWMz88Cp IFYAl1KKInbKxhP4jWgYTe70ZzQzMCKwNFnSJeKX2K1uRj/p79+zOHbwuQGtOypU1LAS hB5+UVCZU0Mmkl9wVrNnOek9Am2S7IBOVmr97ReoCfyEw6I8osuCR6f716IB4ysvjPfh J3pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qepgKNGP; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm7si1122403ejb.575.2021.02.10.02.52.56; Wed, 10 Feb 2021 02:53:20 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qepgKNGP; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbhBJKwJ (ORCPT + 99 others); Wed, 10 Feb 2021 05:52:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:51162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbhBJKs6 (ORCPT ); Wed, 10 Feb 2021 05:48:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 63B2A64E32; Wed, 10 Feb 2021 10:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612954098; bh=A+tqUFt0v8C9om2Xb5/6c/J5Tk6/Nn0sYZZCRyzgco0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qepgKNGPFnho/8QJnDNNpJZJ069jF0DqEVa4U0mzFOfZ6XAx1Ze6eJ3X37gqjvHX+ 1ezWbeX1QUCzheOeQ1QelmyKHj2o+77sDIdiEU4Nzj/ZhZr3u5/2V37I0Q83Ae1gnl /5GfpvERdrBEdLe7Yr6faKnMSyX52giFPbb+9wC4= Date: Wed, 10 Feb 2021 11:48:15 +0100 From: Greg Kroah-Hartman To: Hikaru Nishida Cc: linux-kernel@vger.kernel.org, suleiman@google.com, Alexander Graf , Andra Paraschiv , Masahiro Yamada Subject: Re: [RFC PATCH 2/2] drivers/virt: introduce CLOCK_BOOTTIME adjustment sysfs interface driver Message-ID: References: <20210210103908.1720658-1-hikalium@google.com> <20210210193728.RFC.2.I03c0323c1564a18210ec98fb78b3eb728a90c2d2@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210210193728.RFC.2.I03c0323c1564a18210ec98fb78b3eb728a90c2d2@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 07:39:08PM +0900, Hikaru Nishida wrote: > From: Hikaru Nishida > > This adds a sysfs interface /sys/kernel/boottime_adj to enable advancing > CLOCK_BOOTTIME from the userspace without actual susupend/resume cycles. > > This gives a way to mitigate CLOCK_BOOTTIME divergence between guest > and host on virtualized environments after suspend/resume cycles on > the host. > > We observed an issue of a guest application that expects there is a gap > between CLOCK_BOOTTIME and CLOCK_MONOTONIC after the device is suspended > to detect whether the device went into suspend or not. > Since the guest is paused instead of being actually suspended during the > host's suspension, guest kernel doesn't advance CLOCK_BOOTTIME correctly > and there is no way to correct that. > > To solve the problem, this change introduces a way to modify a gap > between those clocks and align the timer behavior to host's one. > > Signed-off-by: Hikaru Nishida > --- > > drivers/virt/Kconfig | 9 ++++++ > drivers/virt/Makefile | 1 + > drivers/virt/boottime_adj.c | 57 +++++++++++++++++++++++++++++++++++++ > 3 files changed, 67 insertions(+) > create mode 100644 drivers/virt/boottime_adj.c No Documentation/ABI/ update for your new sysfs file? Please fix...