From patchwork Thu May 28 01:46:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 6495761 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D306AC0433 for ; Thu, 28 May 2015 01:50:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CB582070A for ; Thu, 28 May 2015 01:50:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3881720726 for ; Thu, 28 May 2015 01:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbbE1Bu3 (ORCPT ); Wed, 27 May 2015 21:50:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbbE1BuZ (ORCPT ); Wed, 27 May 2015 21:50:25 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 7B44819CF84 for ; Thu, 28 May 2015 01:50:25 +0000 (UTC) Received: from amt.cnet (vpn1-5-142.gru2.redhat.com [10.97.5.142]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4S1oOv9003162; Wed, 27 May 2015 21:50:25 -0400 Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 81D14102633; Wed, 27 May 2015 22:50:05 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id t4S1o5iD027132; Wed, 27 May 2015 22:50:05 -0300 Message-Id: <20150528014929.375138720@redhat.com> User-Agent: quilt/0.60-1 Date: Wed, 27 May 2015 22:46:58 -0300 From: Marcelo Tosatti To: Paolo Bonzini Cc: Luiz Capitulino , kvm@vger.kernel.org, Marcelo Tosatti Subject: [patch 1/3] x86: kvmclock: add flag to indicate pvclock counts from zero References: <20150528014657.367253422@redhat.com> Content-Disposition: inline; filename=01-pvclock-add-flag X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Setting sched clock stable for kvmclock causes the printk timestamps to not start from zero, which is different from baremetal and can possibly break userspace. Add a flag to indicate that hypervisor sets clock base at zero when kvmclock is initialized. Signed-off-by: Marcelo Tosatti --- arch/x86/include/asm/pvclock-abi.h | 1 + 1 file changed, 1 insertion(+) -- 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 Index: kvm/arch/x86/include/asm/pvclock-abi.h =================================================================== --- kvm.orig/arch/x86/include/asm/pvclock-abi.h 2014-11-06 23:59:14.615913334 -0200 +++ kvm/arch/x86/include/asm/pvclock-abi.h 2015-05-27 17:40:53.435192771 -0300 @@ -41,5 +41,6 @@ #define PVCLOCK_TSC_STABLE_BIT (1 << 0) #define PVCLOCK_GUEST_STOPPED (1 << 1) +#define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */