From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zachary Amsden Subject: Re: [KVM timekeeping 11/35] Add helper functions for time computation Date: Mon, 23 Aug 2010 14:58:49 -1000 Message-ID: <4C731949.4010207@redhat.com> References: <1282291669-25709-1-git-send-email-zamsden@redhat.com> <1282291669-25709-12-git-send-email-zamsden@redhat.com> <20100820173440.GF2937@mothafucka.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti , Thomas Gleixner , John Stultz , linux-kernel@vger.kernel.org To: Glauber Costa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592Ab0HXA66 (ORCPT ); Mon, 23 Aug 2010 20:58:58 -0400 In-Reply-To: <20100820173440.GF2937@mothafucka.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On 08/20/2010 07:34 AM, Glauber Costa wrote: > On Thu, Aug 19, 2010 at 10:07:25PM -1000, Zachary Amsden wrote: > >> Add a helper function to compute the kernel time and convert nanoseconds >> back to CPU specific cycles. Note that these must not be called in preemptible >> context, as that would mean the kernel could enter software suspend state, >> which would cause non-atomic operation. >> >> Also, convert the KVM_SET_CLOCK / KVM_GET_CLOCK ioctls to use the kernel >> time helper, these should be bootbased as well. >> > This is one of the things I believe should be applied right now. > Maybe we want a cut version of this patch, that exposes this API while > adjusting KVM_SET_CLOCK / KVM_GET_CLOCK to get in early rather than late? > The first half of the series, at least, is good to go upstream and ready for backport. The trapping and later stuff obviously needs to get some upstream testing.