From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X84mj-0002C3-6C for qemu-devel@nongnu.org; Fri, 18 Jul 2014 05:49:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X84mZ-0001PE-Fq for qemu-devel@nongnu.org; Fri, 18 Jul 2014 05:49:01 -0400 Received: from mx.beyond.pl ([92.43.117.49]:50108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X84mZ-0001P1-8q for qemu-devel@nongnu.org; Fri, 18 Jul 2014 05:48:51 -0400 Message-ID: <53C8ED79.2040908@beyond.pl> Date: Fri, 18 Jul 2014 11:48: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> <53C8E9BD.4070406@beyond.pl> <53C8EAF7.7050909@redhat.com> In-Reply-To: <53C8EAF7.7050909@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable 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 Cc: Amit Shah , Andrey Korolyov , Fam Zheng , "qemu-devel@nongnu.org" , Marcelo Tosatti W dniu 2014-07-18 11:37, Paolo Bonzini pisze: > Il 18/07/2014 11:32, Marcin Gibu=C5=82a ha scritto: >> >>> 3) the next CPU entry will call kvm_arch_put_registers: >>> >>> if (cpu->kvm_vcpu_dirty) { >>> kvm_arch_put_registers(cpu, KVM_PUT_RUNTIME_STATE); >>> cpu->kvm_vcpu_dirty =3D false; >>> } >> >> But, I don't set cpu->kvm_vcpu_dirty anywhere (?). > > Yeah, the next CPU entry will *not* call kvm_arch_put_registers with > your change. It will call it with vanilla cpu_synchronize_all_states()= . That's because in kvmclock, it's used only to read cpu registers, not=20 edit them. Now, because making this call "invisible" makes it work, I'm speculating=20 that following happens: [migration starts] kvmclock: calls cpu_synchronize_all_states() somewhere in qemu: completes IO somewhere in qemu: calls cpu_synchronize_all_states() <- old state Is it (or something similar) possible? I didn't dig deep enough into=20 internals yet, but perhaps you could point if thats the right direction? --=20 mg