From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCSar-0006AM-2k for qemu-devel@nongnu.org; Wed, 30 Jul 2014 08:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCSaj-0005Jb-K3 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 08:02:53 -0400 Received: from mx.beyond.pl ([92.43.117.49]:57587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCSaj-0005Iv-Cs for qemu-devel@nongnu.org; Wed, 30 Jul 2014 08:02:45 -0400 Message-ID: <53D8DEE1.8080905@beyond.pl> Date: Wed, 30 Jul 2014 14:02:41 +0200 From: =?UTF-8?B?TWFyY2luIEdpYnXFgmE=?= MIME-Version: 1.0 References: <20140715210948.GA20036@amt.cnet> <53C5A4C9.80609@redhat.com> <20140716011634.GA30717@amt.cnet> <20140716115229.GA7741@amt.cnet> <53C6EE7C.60702@beyond.pl> <53C79C41.4000800@beyond.pl> <53C7B989.9000203@beyond.pl> <53C7CEE5.4080006@beyond.pl> <53C8DF68.5040705@redhat.com> <53D7D2B5.8060500@redhat.com> In-Reply-To: <53D7D2B5.8060500@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Andrey Korolyov Cc: Amit Shah , Marcelo Tosatti , Fam Zheng , "qemu-devel@nongnu.org" On 29.07.2014 18:58, Paolo Bonzini wrote: > Il 18/07/2014 10:48, Paolo Bonzini ha scritto: >> >> It is easy to find out if the "fix" is related to 1 or 2/3: just write >> >> if (cpu->kvm_vcpu_dirty) { >> printf ("do_kvm_cpu_synchronize_state_always: look at 2/3\n"); >> kvm_arch_get_registers(cpu); >> } else { >> printf ("do_kvm_cpu_synchronize_state_always: look at 1\n"); >> } >> >> To further refine between 2 and 3, I suppose you can set a breakpoint on >> cpu_synchronize_all_states and kvm_cpu_exec, and see which is called >> first after cpu_synchronize_all_states_always. > > Marcin, have you ever gotten round to doing this? Source side of migration, without my ugly hack: called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers called kvm_cpu_synchronize_state: vcpu dirty called kvm_cpu_synchronize_state: vcpu dirty shutting down without it: called do_kvm_cpu_synchronize_state_always called do_kvm_cpu_synchronize_state_always called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers shutting down So it's probably about 2 from your list ("the next call to do_kvm_cpu_synchronize_state will do kvm_arch_get_registers"). I've tapped into kvm_cpu_exec() to find out if it's kvm_arch_put_registers(), but nothing was logged during migration so it's probably not 3. -- mg