From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: KVM: x86: workaround SuSE's 2.6.16 pvclock vs masterclock issue Date: Thu, 22 Jan 2015 09:10:13 +0100 Message-ID: <54C0B065.8070801@redhat.com> References: <20150120175452.GA32680@amt.cnet> <20150121140926.GA9085@potion.brq.redhat.com> <20150121141634.GB718@amt.cnet> <20150121170033.GB9085@potion.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm-devel To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Marcelo Tosatti Return-path: Received: from mail-wg0-f51.google.com ([74.125.82.51]:56412 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbbAVIKR (ORCPT ); Thu, 22 Jan 2015 03:10:17 -0500 Received: by mail-wg0-f51.google.com with SMTP id l18so201503wgh.10 for ; Thu, 22 Jan 2015 00:10:16 -0800 (PST) In-Reply-To: <20150121170033.GB9085@potion.brq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 21/01/2015 18:00, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > 2015-01-21 12:16-0200, Marcelo Tosatti: >> On Wed, Jan 21, 2015 at 03:09:27PM +0100, Radim Kr=C4=8Dm=C3=A1=C5=99= wrote: >>> 2015-01-20 15:54-0200, Marcelo Tosatti: >>>> SuSE's 2.6.16 kernel fails to boot if the delta between tsc_timest= amp >>>> and rdtsc is larger than a given threshold: >>> [...] >>>> Disable masterclock support (which increases said delta) in case t= he >>>> boot vcpu does not use MSR_KVM_SYSTEM_TIME_NEW. >>> >>> Why do we care about 2.6.16 bugs in upstream KVM? >> >> Because people do use 2.6.16 guests. >=20 > (Those people probably won't use 3.19+ host ... Why not? If you are a cloud provider, you cannot really know what guest= s your customer run. Also, the masterclock support has been in there for a while. It was no= t working as well as it could, which is why we noticed it only now, but still it was broken before as well. 1/5th of a jiffy is a really reall= y low amount. >>> MSR_KVM_SYSTEM_TIME is deprecated -- we could remove it now, with >>> MSR_KVM_WALL_CLOCK (after hiding KVM_FEATURE_CLOCKSOURCE) if we wan= t >>> to support old guests. >> >> What is the benefit of removing support for MSR_KVM_SYSTEM_TIME ? >=20 > The maintainability of the code increases. It would look as if we ne= ver > made the mistake with MSR_KVM_SYSTEM_TIME & MSR_KVM_WALL_CLOCK. > (I like when old code looks as if we wrote it from scratch.) Everybody does, and everybody obsesses over splitting patches so that they look as if the code had been split that way from scratch. Heck, I probably spend over half of my development time inside "git rebase -i". But it's just not how reality works, and it must show sooner or later. :) Anyway, it's just two case labels or so (before this patch). >> Supporting old guests is important. >=20 > It comes at a price. > (Mutually exclusive goals are important as well.) Marcelo's patch is not too high a price. Is it ugly? Yes. Could it b= e any better? No, because the ugliness is not his fault, it's intrinsic in the problem it solves. Paolo