From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRilW-0003Nc-Bh for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRilS-0003dK-Df for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:25:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRilS-0003ck-8R for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:25:26 -0400 Date: Tue, 18 Aug 2015 08:25:23 -0700 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20150818152521.GA31039@potion.redhat.com> References: <55CDCCE6.90102@kamp.de> <87zj1thc5z.fsf@linaro.org> <55D34724.6000209@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <55D34724.6000209@kamp.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Help debugging a regression in KVM Module List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Paolo Bonzini , Alex =?utf-8?Q?Benn=C3=A9e?= , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Jan Kiszka 2015-08-18 16:54+0200, Peter Lieven: > After some experiments I was able to find out the bad commit that intro= duced the regression: >=20 > commit f30ebc312ca9def25650b4e1d01cdb425c310dca > Author: Radim Kr=C4=8Dm=C3=A1=C5=99 > Date: Thu Oct 30 15:06:47 2014 +0100 >=20 > It seems that this optimisation is not working reliabliy after live mig= ration. I can't reproduce if > I take a 3.19 kernel and revert this single commit. Hello, this bug has gone unnoticed for a long time so it is fixed only since v4.1 (and v3.19.stable was dead at that point). commit b6ac069532218027f2991cba01d7a72a200688b0 Author: Radim Kr=C4=8Dm=C3=A1=C5=99 Date: Fri Jun 5 20:57:41 2015 +0200 KVM: x86: fix lapic.timer_mode on restore =20 lapic.timer_mode was not properly initialized after migration, which broke few useful things, like login, by making every sleep eternal. =20 Fix this by calling apic_update_lvtt in kvm_apic_post_state_restore. =20 There are other slowpaths that update lvtt, so this patch makes sure something similar doesn't happen again by calling apic_update_lvtt after every modification. =20 Cc: stable@vger.kernel.org Fixes: f30ebc312ca9 ("KVM: x86: optimize some accesses to LVTT and SP= IV") Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 Signed-off-by: Marcelo Tosatti