Received: from eggs.gnu.org ([2001:4830:134:3::10]:41950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Hgk-0001Ok-Ex for qemu-devel@nongnu.org; Fri, 27 May 2016 09:20:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6Hgg-00075H-5W for qemu-devel@nongnu.org; Fri, 27 May 2016 09:20:29 -0400 Received: from forward3j.cmail.yandex.net ([5.255.227.21]:52795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Hge-00072V-QM for qemu-devel@nongnu.org; Fri, 27 May 2016 09:20:26 -0400 From: Dmitry Poletaev In-Reply-To: <42b63d52-6a22-15fa-6539-a5674e0525ef@redhat.com> References: <2040741464256515@web29h.yandex.ru> <42b63d52-6a22-15fa-6539-a5674e0525ef@redhat.com> MIME-Version: 1.0 Message-Id: <4411051464355212@web24j.yandex.ru> Date: Fri, 27 May 2016 16:20:12 +0300 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [QESTION] target-i386/kvm: vmx realization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , QEMU Developers Cc: "pavel.dovgaluk@ispras.ru" Thanks for answer. I think it should be non zero too. Because of guest state is defined by v= mcs fields, it is unclear for me, why kvm handle same situation in differ= ent way. I didn't see this script and tests. Unit tests end by timeout (I've incre= ased it 15 times, all the same) and kvm script prints almost different tr= aces. Anyway, it is nice tools for futher debugging.=20 May be you could give some more advises? Thank you. 26.05.2016, 13:09, "Paolo Bonzini" : > On 26/05/2016 11:55, Dmitry Poletaev wrote: >> =9Akvm_mmu_page_fault goes to nonpaging_page_fault, which don't find p= age in cache and calls nonpaging_map. nonpaging_map exits after critical = section before out_unlock label. For me reaction is normal and looks the = same on both platforms, but I think problem may be here deeper. >> =9AAfter #PF handling kvm enters to guest again and here difference be= gins. Real machine have new #PF far away from this address, but qemu fall= s to kvm again with #PF on 0xfe05b. >> =9AThis situation repeats infinitely. Qemu vmcs fields after exit to k= vm don't have important differencies (on my view) with Intel vmcs. >> =9ASome more info I received after logging qemu's address translation. >> =9AQemu rises first #PF on first entry to guest (pml4e =3D 0x3d9fe001 = pdpe >> =9A=3D 0x0). On second entry to guest, after kvm handling, it rise #PF= again >> =9A(pml4e =3D 0x3d9fe021 pdpe =3D 0x3d9fa027 pde =3D 0x0). Next entrie= s to guest >> =9Ais the same (PF and pml4e =3D 0x3d9fe021 pdpe =3D 0x3d9fa027 pde =3D= 0x0). > > I think the PDE and PTE should have become non-zero, but I'm not sure. > > You can use the kvm_flightrecorder script > (scripts/kvm/kvm_flightrecorder in the QEMU git tree) to find where the > differences start exactly. > > You can also compare QEMU and Bochs. > > BTW, have you tried running the VMX testcases from kvm-unit-tests.git? > > Thanks, > > Paolo > >> =9AMay be someone know, why it is happens and how I can fix my vmx rea= lization, or where I should look.