Re: kernel bug in kvm_intel

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

 



On Thu, 2009-10-15 at 15:18 -0500, Andrew Theurer wrote:
> On Thu, 2009-10-15 at 02:10 +0900, Avi Kivity wrote:
> > On 10/13/2009 11:04 PM, Andrew Theurer wrote:
> > >
> > >> Look at the address where vmx_vcpu_run starts, add 0x26d, and show the
> > >> surrounding code.
> > >>
> > >> Thinking about it, it probably _is_ what you showed, due to module page
> > >> alignment.  But please verify this; I can't reconcile the fault address
> > >> (ffffffff9fe9a2b) with %rsp at the time of the fault.
> > >>      
> > > Here is the start of the function:
> > >
> > >    
> > >> 0000000000003884<vmx_vcpu_run>:
> > >>      3884:       55                      push   %rbp
> > >>      3885:       48 89 e5                mov    %rsp,%rbp
> > >>      
> > > and 0x26d later is 0x3af1:
> > >
> > >    
> > >>      3ad2:       4c 8b b1 88 01 00 00    mov    0x188(%rcx),%r14
> > >>      3ad9:       4c 8b b9 90 01 00 00    mov    0x190(%rcx),%r15
> > >>      3ae0:       48 8b 89 20 01 00 00    mov    0x120(%rcx),%rcx
> > >>      3ae7:       75 05                   jne    3aee<vmx_vcpu_run+0x26a>
> > >>      3ae9:       0f 01 c2                vmlaunch
> > >>      3aec:       eb 03                   jmp    3af1<vmx_vcpu_run+0x26d>
> > >>      3aee:       0f 01 c3                vmresume
> > >>      3af1:       48 87 0c 24             xchg   %rcx,(%rsp)
> > >>      3af5:       48 89 81 18 01 00 00    mov    %rax,0x118(%rcx)
> > >>      3afc:       48 89 99 30 01 00 00    mov    %rbx,0x130(%rcx)
> > >>      3b03:       ff 34 24                pushq  (%rsp)
> > >>      3b06:       8f 81 20 01 00 00       popq   0x120(%rcx)
> > >>      
> > >
> > 
> > Ok.  So it faults on the xchg instruction, rsp is ffff8806369ffc80 but 
> > the fault address is ffffffff9fe9a2b4.  So it looks like the IDT is 
> > corrupted.
> > 

I have finally bisected and isolated this to the following commit:

ada3fa15057205b7d3f727bba5cd26b5912e350f
http://git.kernel.org/?p=virt/kvm/kvm.git;a=commit;h=ada3fa15057205b7d3f727bba5cd26b5912e350f
> Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu
> 
> * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
>   powerpc64: convert to dynamic percpu allocator
>   sparc64: use embedding percpu first chunk allocator
>   percpu: kill lpage first chunk allocator
>   x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
>   percpu: update embedding first chunk allocator to handle sparse units
>   percpu: use group information to allocate vmap areas sparsely
>   vmalloc: implement pcpu_get_vm_areas()
>   vmalloc: separate out insert_vmalloc_vm()
>   percpu: add chunk->base_addr
>   percpu: add pcpu_unit_offsets[]
>   percpu: introduce pcpu_alloc_info and pcpu_group_info
>   percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
>   percpu: add @align to pcpu_fc_alloc_fn_t
>   percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
>   percpu: drop @static_size from first chunk allocators
>   percpu: generalize first chunk allocator selection
>   percpu: build first chunk allocators selectively
>   percpu: rename 4k first chunk allocator to page
>   percpu: improve boot messages
>   percpu: fix pcpu_reclaim() locking

The previous commit (5579fd7e6aed8860ea0c8e3f11897493153b10ad) does not
this problem.  FYI, this problem only occurs when oprofile is active.

Any idea what in this commit might be the issue?

-Andrew

--
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