Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 8, 2013 at 8:18 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> 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 <kashyap.cv@xxxxxxxxx> 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


Paolo, here's L0's trace with shadow-on-EPT.

I invoked with the below command line on L0

 $ /usr/bin/trace-cmd record -b 10000 -e kvmmmu

then, started the L2 guest.

Report:

 $ trace-cmd report 2>&1 | less


The trace data file was large (150MB), just pasting the repeating message here:
---------------------
.
.
.
 qemu-system-x86-2006  [000] 57931.272466: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272468: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272469: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272469: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272497: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272497: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272497: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272497: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272516: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272516: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272516: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272517: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272525: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272525: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272525: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272525: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272540: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272540: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272540: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272541: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272580: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272581: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272581: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272581: kvm_mmu_paging_element: pte
12001e1 level 2
 qemu-system-x86-2006  [000] 57931.272593: kvm_mmu_pagetable_walk:
addr ffffffff813d8404 pferr 10 F
 qemu-system-x86-2006  [000] 57931.272594: kvm_mmu_paging_element: pte
1c0f067 level 4
 qemu-system-x86-2006  [000] 57931.272594: kvm_mmu_paging_element: pte
1c10063 level 3
 qemu-system-x86-2006  [000] 57931.272594: kvm_mmu_paging_element: pte
12001e1 level 2
.
.
.
.
qemu-system-x86-2007  [000] 57967.047692: kvm_mmu_get_page:     sp gfn
0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047698: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047701: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047706: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047710: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047724: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047727: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047732: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047736: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3sync
 qemu-system-x86-2007  [000] 57967.047741: kvm_mmu_get_page:     sp
gfn 0 0/4 q0 direct --- !pge !nxe root 3s
---------------------

/kashyap
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux