Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp398053ybm; Fri, 29 May 2020 03:00:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYjaHn5zbXEgd/BHsjRjjZdd9lKMQNsMTGh2OFFE/uVZzF0sOQM6Gu/tuQRmWruRjpFulo X-Received: by 2002:a50:f60a:: with SMTP id c10mr5313312edn.295.1590746413469; Fri, 29 May 2020 03:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590746413; cv=none; d=google.com; s=arc-20160816; b=Zem/OsaoqwWJm9UY6AF63UhQ034+CkeAngKpowXyrhQlep0og04aCbAi1sCBCwhRux /aesBMnso9SyXAaqa08HxX8Ct/xBJIOKphr2cimBdhZ0zxeCJxtMH+1HtfHCNK/AI8D6 fDgI/o0z1JVErhxIAm0fwbrgcpJ+z4IkyMM/m4zauKD+kW0sVPLJAPIAF71S/7JlhM1r eGPtd9T4XKreDdOkp/mZkMpaw2avhfWZl3eW04VdxwjcsDM+Iophsf6BLtP3oUq68I6B 4by5iEt1ZMWCDw81lub7OTDPR7sDl6ll72dwN4dh7WM6zcZNCROaQuDq3sXRCpRLxeTs ktKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=99pOzzXbN5adJubUzcJGXQQVBGmFL/nmnlnO5ZMkTJo=; b=k9M0xCViAZYnq22LtAKjRGrmXBHAjT2yYY2d/FND17YGASN5FvVz5BKFcRrx1y7imK B2pAlp1nN9SvRb4PJBCuURKV3VnELkUAGX0VT2YNEr4QnQkJ5zLvgP1ENp7SRj1fuF4Y 8bOlANPJx15/hexppvGtZMSKJZwXp5Sir4mJVU/JIFfSU8Eax6rlBAHOTs2THI+NaYvY 6K2Bsj06E8ToVPh/IL+tIjbJp1p6YjIyxbZcGBXAbZVFn/9Q67S7bYmm6U28OGN50ITE LsOreHSMlE5s1xKmvtrAVe2yog1UEX/2uO+i2F3YRho9Qu/uK71P2B1opP6RsoWl0MYx P2rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="gprvDCD/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si5174592edw.590.2020.05.29.02.59.49; Fri, 29 May 2020 03:00:13 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="gprvDCD/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbgE2J6C (ORCPT + 99 others); Fri, 29 May 2020 05:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE2J6B (ORCPT ); Fri, 29 May 2020 05:58:01 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE99C08C5C6 for ; Fri, 29 May 2020 02:58:00 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id l27so1504714ejc.1 for ; Fri, 29 May 2020 02:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=99pOzzXbN5adJubUzcJGXQQVBGmFL/nmnlnO5ZMkTJo=; b=gprvDCD/kRqOIy/BgHi73ZOyKU+h3Vg37a1mXEhQlyYlrku3TB6/A76nUIjpaO1btt EQke9n3jMnQ/wZAeMgOMUcfevQ0bxQ5mrKEX6oYqc3jJn6VP9WIwAMmPKFTMJdRJ7g16 1atubjMdmy4paGmVrxzOP5bb7C99Mhzjc1+sI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=99pOzzXbN5adJubUzcJGXQQVBGmFL/nmnlnO5ZMkTJo=; b=YGf2fmrtmyYdZ/g6ukvZCmp1d509kSYAIkQQjg2rCYEBpGkpAomal0d7E+h62QV975 EO9Yb9ufo82m3/+y8YFW71cY3j9PI6aVft0XVnSB2tDVmTi4ntPs43VVZLS3sDAsgI2t ghn3XJGiVgVzVZMGlt0L9zYsz+SbZMI//+zG/0qM3jXaitUv4SeB0T3MlB30TcGeyxLb ZQ4g5xHYfKVS+UY6ZejliCJN9dDsOGSbANKfIDlCz1XXo52B3dUWYDPw9kJ8gwAr3Cbm 65+qW7fscJB5MZLrVWldavwChvgyWEWu7e+N+tj4qm6qhWDRQlQyN7guwgKZ2WICuV7R akrw== X-Gm-Message-State: AOAM531KNLGyz0cVa6SIciNs4yM21QPw4sZOB1hybXwtoucR0V7CJrIz fAu39XbeVuaoMm9/VEkAmSwt9UXc++eTDK3k7MjfB45k0f7VnQ== X-Received: by 2002:a17:907:20d9:: with SMTP id qq25mr6687153ejb.202.1590746278813; Fri, 29 May 2020 02:57:58 -0700 (PDT) MIME-Version: 1.0 References: <875zcfoko9.fsf@nanos.tec.linutronix.de> In-Reply-To: From: Miklos Szeredi Date: Fri, 29 May 2020 11:57:45 +0200 Message-ID: Subject: Re: system time goes weird in kvm guest after host suspend/resume To: Thomas Gleixner Cc: kvm@vger.kernel.org, Paolo Bonzini , Vincenzo Frascino , Juergen Gross , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 11:51 AM Miklos Szeredi wrote: > > On Thu, May 28, 2020 at 10:43 PM Thomas Gleixner wrote: > > > > Miklos Szeredi writes: > > > Bisected it to: > > > > > > b95a8a27c300 ("x86/vdso: Use generic VDSO clock mode storage") > > > > > > The effect observed is that after the host is resumed, the clock in > > > the guest is somewhat in the future and is stopped. I.e. repeated > > > date(1) invocations show the same time. > > > > TBH, the bisect does not make any sense at all. It's renaming the > > constants and moving the storage space and I just read it line for line > > again that the result is equivalent. I'll have a look once the merge > > window dust settles a bit. > > Yet, reverting just that single commit against latest linus tree fixes > the issue. Which I think is a pretty good indication that that commit > *is* doing something. > > The jump forward is around 35 minutes; that seems to be consistent as well. Oh, and here's a dmesg extract for the good case: [ 26.402239] clocksource: timekeeping watchdog on CPU0: Marking clocksource 'tsc' as unstable because the skew is too large: [ 26.407029] clocksource: 'kvm-clock' wd_now: 635480f3c wd_last: 3ce94a718 mask: ffffffffffffffff [ 26.407632] clocksource: 'tsc' cs_now: 92d2e5d08 cs_last: 81305ceee mask: ffffffffffffffff [ 26.409097] tsc: Marking TSC unstable due to clocksource watchdog and the bad one: [ 36.667576] clocksource: timekeeping watchdog on CPU1: Marking clocksource 'tsc' as unstable because the skew is too large: [ 36.690441] clocksource: 'kvm-clock' wd_now: 89885027c wd_last: 3ea987282 mask: ffffffffffffffff [ 36.690994] clocksource: 'tsc' cs_now: 95666ec22 cs_last: 84e747930 mask: ffffffffffffffff [ 36.691901] tsc: Marking TSC unstable due to clocksource watchdog Thanks, Miklos