jidong xiao wrote:
> Hi,
> 
>   I am using sles10sp2 beta kernel(x86_64) in which the new backtrace
> mechanism for x86 is used.

Hi Jidong,

Sorry for being late in response. I have been away for two weeks.

The "undefined BBRG_RSP" problem hit me at i386 even worse. I was
not even able to do a 'bt' while i was able to do a 'bt' after
i triggered a MCA on x86_64 using a test module.

I do not know how to fix this problem. Any suggestion from anyone?
Keith?

- jay


>   I was attemptting to use bb1 command to analysis
> do_hypervisor_callback and evtchn_do_upcall. In SLES10Sp2,
> do_hypervisor_callback is defined in arch/x86_64/kernel/entry-xen.S,
> although there is no such a file in the mainline kernel, but I think
> this has nothing to do with the problem.
> 
>   below is the disassemble result of
> do_hypervisor_callback.(evtchn_do_upcall is called by
> do_hypervisor_callback).
> 
> [0]kdb> id do_hypervisor_callback
> 0xffffffff8010ab7c do_hypervisor_callback:         mov    %rdi,%rsp
> 0xffffffff8010ab7f do_hypervisor_callback+0x3:     incl   %gs:0x20
> 0xffffffff8010ab87 do_hypervisor_callback+0xb:     mov    %rsp,%rbp
> 0xffffffff8010ab8a do_hypervisor_callback+0xe:     cmove  %gs:0x28,%rsp
> 0xffffffff8010ab94 do_hypervisor_callback+0x18:    push   %rbp
> 0xffffffff8010ab95 do_hypervisor_callback+0x19:    callq
> 0xffffffff80281871 evtchn_do_upcall
> 0xffffffff8010ab9a do_hypervisor_callback+0x1e:    pop    %rsp
> 0xffffffff8010ab9b do_hypervisor_callback+0x1f:    decl   %gs:0x20
> 0xffffffff8010aba3 do_hypervisor_callback+0x27:    jmpq
> 0xffffffff8010aaef error_exit
> 0xffffffff8010aba8 restore_all_enable_events:         mov    %gs:0x24,%rsi
> 0xffffffff8010abb1 restore_all_enable_events+0x9:     shl    $0x20,%rsi
> 0xffffffff8010abb5 restore_all_enable_events+0xd:     shr    $0x1a,%rsi
> 0xffffffff8010abb9 restore_all_enable_events+0x11:    add
> 0xffffffff8039d628,%rsi
> 0xffffffff8010abc1 restore_all_enable_events+0x19:    movb   $0x0,0x1(%rsi)
> 
> Here we see 0xffffffff8010ab9a is the exit point of evtchn_do_upcall.
> However bb1 command fails when I tried to give it this address.
> 
> [0]kdb> bb1 0xffffffff8010ab9a
> bb_pass1: func_name do_hypervisor_callback func_start
> 0xffffffff8010ab7c func_end 0xffffffff8010aba8
> bb_pass1: end
>   bb[0] start 0xffffffff8010ab7c end 0xffffffff8010aba3 drop_through 0
> bb_pass2: start
> 
>   bb_pass2_do_changed_blocks: allow_missing 0
> 
>   bb[0]
>   bb_reg_state ffffffff805153d8
>     rax = rax
>     rbx = rbx
>     rcx = rcx
>     rdx = rdx
>     rdi = rdi
>     rsi = rsi
>     rbp = rbp
>     rsp = osp+0x0
>     r8 = r8
>     r9 = r9
>     r10 = r10
>     r11 = r11
>     r12 = r12
>     r13 = r13
>     r14 = r14
>     r15 = r15
>  '0xffffffff8010ab7c do_hypervisor_callback:         mov    %rdi,%rsp'
>   opcode 'mov' matched by 'mov', usage 36
>   src  R: %rdi base_rc 6 (rdi)
>   dst  R: %rsp base_rc 9 (rsp)
>   rsp = rdi (rdi)
>  '0xffffffff8010ab7f do_hypervisor_callback+0x3:     incl   %gs:0x20'
>   opcode 'incl' matched by 'inc', usage 5
>   src  M: %gs:0x20
>  '0xffffffff8010ab87 do_hypervisor_callback+0xb:     mov    %rsp,%rbp'
>   opcode 'mov' matched by 'mov', usage 36
>   src  R: %rsp base_rc 9 (rsp)
>   dst  R: %rbp base_rc 8 (rbp)
>   rbp = rsp (rdi)
>  '0xffffffff8010ab8a do_hypervisor_callback+0xe:     cmove  %gs:0x28,%rsp'
>   opcode 'cmove' matched by 'cmov', usage 19
>   src  M: %gs:0x28
>   dst  R: %rsp base_rc 9 (rsp)
>  '0xffffffff8010ab94 do_hypervisor_callback+0x18:    push   %rbp'
>   opcode 'push' matched by 'push', usage 44
>   src  R: %rbp base_rc 8 (rbp)
> push when BBRG_RSP is undefined?
> bb_pass2: end bb_reg_params 0 bb_memory_params 0
> kdb_bb: 0xffffffff8010ab9a [kernel]do_hypervisor_callback failed at
> 0xffffffff8010ab94
> 
> It's very clear why this issue happens, since the first step of this
> function, rsp becomes no longer being referenced by osp. My question
> is, is there any way to fix this?
> 
> Regards
> Jason
> ---------------------------
> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.

Reply via email to