From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mammedov Subject: Re: x86: kvmclock: abstract save/restore sched_clock_state Date: Wed, 08 Feb 2012 11:53:59 +0100 Message-ID: <4F325447.4010006@redhat.com> References: <20120207210542.GC20618@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, johnstul@us.ibm.com, riel@redhat.com, avi@redhat.com To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755332Ab2BHKyN (ORCPT ); Wed, 8 Feb 2012 05:54:13 -0500 In-Reply-To: <20120207210542.GC20618@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 02/07/2012 10:05 PM, Marcelo Tosatti wrote: > > Upon resume from hibernation, CPU 0's hvclock area contains the old > values for system_time and tsc_timestamp. It is necessary for the > hypervisor to update these values with uptodate ones before the CPU uses > them. > > Abstract TSC's save/restore sched_clock_state functions and use > restore_state to write to KVM_SYSTEM_TIME MSR, forcing an update. > > Fixes suspend-to-disk with kvmclock. > > Signed-off-by: Marcelo Tosatti > Acked-by: Igor Mammedov