From patchwork Fri Sep 5 20:41:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 4854831 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B631E9F32F for ; Fri, 5 Sep 2014 20:41:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDCF4201CE for ; Fri, 5 Sep 2014 20:41:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EB87201C8 for ; Fri, 5 Sep 2014 20:41:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092AbaIEUli (ORCPT ); Fri, 5 Sep 2014 16:41:38 -0400 Received: from www.linutronix.de ([62.245.132.108]:34277 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbaIEUli (ORCPT ); Fri, 5 Sep 2014 16:41:38 -0400 Received: from localhost ([127.0.0.1]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XQ0K5-0003mx-SW; Fri, 05 Sep 2014 22:41:34 +0200 Date: Fri, 5 Sep 2014 22:41:32 +0200 (CEST) From: Thomas Gleixner To: Paolo Bonzini cc: linux-kernel@vger.kernel.org, chris.j.arges@canonical.com, kvm@vger.kernel.org, John Stultz Subject: Re: [PATCH] KVM: x86: fix kvmclock breakage from timers branch merge In-Reply-To: <540A1F22.7020107@redhat.com> Message-ID: References: <1409835487-14371-1-git-send-email-pbonzini@redhat.com> <5408D815.9090105@redhat.com> <5409E755.4040905@redhat.com> <540A1F22.7020107@redhat.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 5 Sep 2014, Paolo Bonzini wrote: > Il 05/09/2014 20:33, Thomas Gleixner ha scritto: > >> > update_vsyscall(tk); > >> > - update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET); > >> > > >> > tk_update_ktime_data(tk); > >> > + update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET); > > Why are you moving the update between vsycall and pvclock update as I > > did in my patch? We really need to update everything before calling > > somewhere. > > Do you mean the call should be moved not just after tk_update_ktime_data > (which sets base_mono), but further down after > > update_fast_timekeeper(tk); No, it needs to be above update_vsyscall(). Here is the patch again which I sent before. [https://lkml.org/lkml/2014/9/5/395] Thanks, tglx --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index fb4a9c2cf8d9..ec1791fae965 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -442,11 +442,12 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action) tk->ntp_error = 0; ntp_clear(); } - update_vsyscall(tk); - update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET); tk_update_ktime_data(tk); + update_vsyscall(tk); + update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET); + if (action & TK_MIRROR) memcpy(&shadow_timekeeper, &tk_core.timekeeper, sizeof(tk_core.timekeeper));