From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzN8I-0000uv-JX for qemu-devel@nongnu.org; Wed, 26 Oct 2016 08:16:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzN8D-0001vc-MR for qemu-devel@nongnu.org; Wed, 26 Oct 2016 08:16:38 -0400 Received: from mail.ispras.ru ([83.149.199.45]:55710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzN8D-0001v3-9d for qemu-devel@nongnu.org; Wed, 26 Oct 2016 08:16:33 -0400 From: "poletaev" Date: Wed, 26 Oct 2016 15:16:25 +0300 Message-ID: <000501d22f82$c57f3d70$507db850$@Poletaev@ispras.ru> MIME-Version: 1.0 Content-Language: ru Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] vmx support for qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Pavel.Dovgaluk@ispras.ru Hello. I am trying to make realization of vmx for qemu. For now it can: - decode vmx instructions, vmx determination and vmx MSRs reading is supported - handle interrupts, exceptions, vm exits due to cr 0/4 exits, cr shadowing is supported - run bios POST and some amount of guest code in VirtualBox (tested on 5+ version). Current problem here is a strange wish of hypervisor to change processor mode in vmx non-root to vm86 and find ill_op there. I have no ideas, why VirtualBox wants it (may be someone knows?). - configure guest in kvm, but guest can't run due to #PF which kvm can't handle right on my realization. Details: when kvm configures guest and enters in it, #PF with 0xfe05b address happens. Kvm goes to handle #PF. kvm_mmu_page_fault goes to nonpaging_page_fault, which don't find page in cache and calls nonpaging_map. nonpaging_map exits after critical section before out_unlock label. For me reaction looks normal, but I didn't dig deeper. After #PF handling kvm enters to guest again and falls to kvm again with #PF on 0xfe05b. This situation repeats infinitely. If somebody have an interest in subject, he can find sources here https://github.com/ispras/qemu.git , branch vmx. Best regards, Dmitry Poletaev.