From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757605AbbIVAkw (ORCPT ); Mon, 21 Sep 2015 20:40:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52373 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756886AbbIVAku (ORCPT ); Mon, 21 Sep 2015 20:40:50 -0400 Date: Mon, 21 Sep 2015 21:40:19 -0300 From: Marcelo Tosatti To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Luiz Capitulino Subject: Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO. Message-ID: <20150922004019.GA25115@amt.cnet> References: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> <20150920225742.GA27666@amt.cnet> <20150921151209.GA2734@potion.brq.redhat.com> <20150921155224.GA12938@amt.cnet> <20150921200026.GB2734@potion.brq.redhat.com> <20150921205312.GA17800@amt.cnet> <20150921220039.GC2734@potion.brq.redhat.com> <20150921223713.GA21139@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150921223713.GA21139@amt.cnet> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > So either: > > Proceed with guest solution: > -> Make sure the overflow can't happen (and write down why not in the > code). Don't assume a small delta between kvmclock values of vcpus. > -> Handle stable -> non-stable kvmclock transition. > -> kvmclock counts from zero should not depend on stable kvmclock > (because nohz_full should work on hpet host systems). > > Enable counts-from-zero on MSR_KVM_SYSTEM_TIME_NEW: > -> Figure out whats wrong with different kvmclock values on hotplug, > and fix it. Find data which allows you to differentiate between hotplug of pCPU-0 and system initialization. Easy one: whether MSR_KVM_SYSTEM_TIME_NEW contains valid data (that is kvmclock is enabled) for vCPUs other than vCPU-0. This can't be the case on system initialization (otherwise the host will be corrupting guest memory), and must be the case when hotplugging vCPU-0.