From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwbZc-0004Ic-T6 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:05:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwbZZ-0000Su-Cw for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:05:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45276) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwbZZ-0000Ru-7f for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:05:21 -0400 Date: Tue, 18 Oct 2016 19:05:14 -0200 From: Eduardo Habkost Message-ID: <20161018210514.GC5057@thinpad.lan.raisama.net> References: <20161014212031.GQ3275@thinpad.lan.raisama.net> <20161017094708.GB31691@amt.cnet> <20161017145008.GA2307@potion> <72b8c6b3-f08a-735a-e283-99d0195dcf7d@redhat.com> <20161017211101.GD3275@thinpad.lan.raisama.net> <20161017235846.GA22657@amt.cnet> <74794dbf-a904-54b9-315f-1bc385a959ba@redhat.com> <20161018170924.GA14243@amt.cnet> <20161018205213.GA2511@potion> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161018205213.GA2511@potion> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] invtsc + migration + TSC scaling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: Marcelo Tosatti , Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org On Tue, Oct 18, 2016 at 10:52:14PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 wro= te: [...] > The main problem is that QEMU changes virtual_tsc_khz when migrating > without hardware scaling, so KVM is forced to get nanoseconds wrong ... >=20 > If QEMU doesn't want to keep the TSC frequency constant, then it would > be better if it didn't expose TSC in CPUID -- guest would just use > kvmclock without being tempted by direct TSC accesses. Isn't enough to simply not expose invtsc? Aren't guests expected to assume the TSC frequency can change if invtsc isn't set on CPUID? --=20 Eduardo