From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot Date: Tue, 08 Oct 2013 16:48:05 +0200 Message-ID: <52541B25.504@redhat.com> References: <20131004093859.GF31244@redhat.com> <20131004130550.GA12257@redhat.com> <20131004130817.GB12257@redhat.com> <52540298.2030807@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kashyap Chamarthy , Gleb Natapov , "kvm@vger.kernel.org" To: unlisted-recipients:; (no To-header on input) Return-path: Received: from mail-qe0-f53.google.com ([209.85.128.53]:61200 "EHLO mail-qe0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754787Ab3JHOsP (ORCPT ); Tue, 8 Oct 2013 10:48:15 -0400 Received: by mail-qe0-f53.google.com with SMTP id cy11so2565594qeb.12 for ; Tue, 08 Oct 2013 07:48:10 -0700 (PDT) In-Reply-To: <52540298.2030807@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 08/10/2013 15:03, Paolo Bonzini ha scritto: > Il 08/10/2013 07:38, Kashyap Chamarthy ha scritto: >> On Mon, Oct 7, 2013 at 6:29 PM, Kashyap Chamarthy wrote: >>> Gleb, so I just did a trace of KVM MMU to try to understand why L2 is >>> stuck with shadow on EPT >> >> Paolo, were you able to reproduce this again? Yesterday, on #qemu you >> mentioned you'll test it again :-) > > Yes, I could reproduce it too. > >>> Boot L2 guest: > > Here L2 doesn't go past the second instruction. It gets a page fault > even though the spte is present, and KVM then loops on a page fault > for 0xfe05b. > > Here is an annotated function_graph trace of L1. > > It's possible that L0 is injecting the same fault repeatedly, i.e. > they are not different faults from the processor. I'll get an L0 > trace next. > The L0 trace is not particularly helpful (and probably would not be particularly helpful even if there were a specific tracepoint for VMREAD): 287.534156: kvm_exit: reason VMRESUME rip 0xffffffffa021f8d1 info 0 0 287.534160: kvm_mmu_get_page: sp gfn 0 0/4 q0 direct --- !pge !nxe root 0sync 287.534161: kvm_entry: vcpu 0 287.534162: kvm_exit: reason EXCEPTION_NMI rip 0xe05b info fe05b 80000b0e 287.534170: kvm_mmu_get_page: sp gfn 0 0/4 q0 direct --- !pge !nxe root 0sync 287.534171: kvm_entry: vcpu 0 287.534172: kvm_exit: reason VMREAD rip 0xffffffffa021f97d info 0 0 287.534173: kvm_entry: vcpu 0 287.534174: kvm_exit: reason VMREAD rip 0xffffffffa021f996 info 0 0 287.534174: kvm_entry: vcpu 0 287.534175: kvm_exit: reason VMREAD rip 0xffffffffa021f9b5 info 0 0 287.534175: kvm_entry: vcpu 0 287.534177: kvm_exit: reason VMREAD rip 0xffffffffa021b377 info 0 0 287.534177: kvm_entry: vcpu 0 287.534178: kvm_exit: reason VMREAD rip 0xffffffffa021b5ce info 0 0 287.534179: kvm_entry: vcpu 0 287.534180: kvm_exit: reason VMREAD rip 0xffffffffa0222c95 info 0 0 287.534180: kvm_entry: vcpu 0 287.534181: kvm_exit: reason VMREAD rip 0xffffffffa0222e1c info 0 0 287.534182: kvm_entry: vcpu 0 287.534185: kvm_exit: reason MSR_READ rip 0xffffffff8104c2b6 info 0 0 287.534185: kvm_msr: msr_read 1d9 = 0x0 287.534185: kvm_entry: vcpu 0 And then it repeats: 287.534186: kvm_exit: reason VMRESUME rip 0xffffffffa021f8d1 info 0 0 287.534191: kvm_mmu_get_page: sp gfn 0 0/4 q0 direct --- !pge !nxe root 0sync 287.534192: kvm_entry: vcpu 0 Trying to add function_graph loses a lot of events. Paolo