From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [patch 1/3] x86: kvmclock: add flag to indicate pvclock counts from zero Date: Wed, 27 May 2015 22:46:58 -0300 Message-ID: <20150528014929.375138720@redhat.com> References: <20150528014657.367253422@redhat.com> Cc: Luiz Capitulino , kvm@vger.kernel.org, Marcelo Tosatti To: Paolo Bonzini Return-path: 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) Content-Disposition: inline; filename=01-pvclock-add-flag Sender: kvm-owner@vger.kernel.org List-ID: 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(+) 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 */