From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Schade Subject: Re: Restoring saved guest causes guest to reboot Date: Wed, 25 May 2011 08:49:43 +0200 Message-ID: <4DDCA687.9080506@gmail.com> References: <20110524091810.GH23407@8bytes.org> <20110524094023.GI23407@8bytes.org> <20110524130208.GJ23407@8bytes.org> <4DDBB085.2010907@redhat.com> <4DDBB5D3.3020403@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from lms.your-server.de ([213.133.106.252]:45337 "EHLO lms.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754051Ab1EYHRf (ORCPT ); Wed, 25 May 2011 03:17:35 -0400 In-Reply-To: <4DDBB5D3.3020403@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/24/2011 03:42 PM, Avi Kivity wrote: > On 05/24/2011 04:37 PM, Markus Schade wrote: >> On Tue, 24 May 2011, Avi Kivity wrote: >> >>>> Hmm, only 19 patches between .37 and .38 touch vmx.c. Avi, any idea >>>> which >>>> of those patches could cause this? >>> >>> Might be several. >>> >>> Markus, can you try a bisect? >>> >>> The command >>> >>> $ git bisect start v2.6.38 v2.6.37 arch/x86/kvm >>> >>> will generate test kernels for you to compile and run. There will be >>> 7-8 tests needed, and most of the compiles should be short (esp. if >>> you install ccache). >> >> Sure. I will take some time, though. Shall I use Linus git tree or the >> kvm one? > > Either will work - the kvm tree includes the Linus tree. Since you > tested .37 and .38, best to give those to git as starting points. Git bisect tells me that this is the first bad commit: -----------------%<----------------- aff48baa34c033318ad322ecbf2e4bcd891b29ca is the first bad commit commit aff48baa34c033318ad322ecbf2e4bcd891b29ca Author: Avi Kivity Date: Sun Dec 5 18:56:11 2010 +0200 KVM: Fetch guest cr3 from hardware on demand Instead of syncing the guest cr3 every exit, which is expensince on vmx with ept enabled, sync it only on demand. [sheng: fix incorrect cr3 seen by Windows XP] Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity :040000 040000 fb059dc23facd323cafc88a39cff862f044d693d 77247dfbfe49f0a732cbaa2593d794c3b6c8f0fc M arch -----------------%<----------------- The full log is: # bad: [521cb40b0c44418a4fd36dc633f575813d59a43d] Linux 2.6.38 # good: [3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5] Linux 2.6.37 git bisect start 'v2.6.38' 'v2.6.37' 'arch/x86/kvm' # good: [ec9e60b21977007e3dfacc2b8fe3a8fbb9276b51] KVM: X86: Introduce generic guest-mode representation git bisect good ec9e60b21977007e3dfacc2b8fe3a8fbb9276b51 # good: [d4dbf470096c51cb4785167ea59fdbdea87ccbe4] KVM: MMU: Make the way of accessing lpage_info more generic git bisect good d4dbf470096c51cb4785167ea59fdbdea87ccbe4 # good: [c445f8ef43bd9d2fb28213920d9b21f2465d22df] KVM: MMU: Initialize base_role for tdp mmus git bisect good c445f8ef43bd9d2fb28213920d9b21f2465d22df # bad: [444e863d13373b958ec6b133dcecf140d6c6c2ab] KVM: VMX: when entering real mode align segment base to 16 bytes git bisect bad 444e863d13373b958ec6b133dcecf140d6c6c2ab # good: [9f8fe5043fd26627c2fa2e9a41896885e675000b] KVM: Replace reads of vcpu->arch.cr3 by an accessor git bisect good 9f8fe5043fd26627c2fa2e9a41896885e675000b # bad: [b034cf0105235e65ee1b0161dbe8fef0338d06e7] KVM: MMU: audit: allow audit more guests at the same time git bisect bad b034cf0105235e65ee1b0161dbe8fef0338d06e7 # bad: [aff48baa34c033318ad322ecbf2e4bcd891b29ca] KVM: Fetch guest cr3 from hardware on demand git bisect bad aff48baa34c033318ad322ecbf2e4bcd891b29ca Best regards, Markus