the original discuss is here: http://lists.xen.org/archives/html/xen-devel/2013-11/msg00011.html Bamvor Jian Zhang (2): xen: arm: enable 32bit kernel stack trace xen: arm: add default kernel_start in xenctx tools/xentrace/xenctx.c | 6 ++++-- xen/arch/arm/traps.c | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) -- 1.8.1.4
Bamvor Jian Zhang
2013-Nov-04 08:01 UTC
[PATCH 1/2] xen: arm: enable 32bit kernel stack trace
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com> --- xen/arch/arm/traps.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 4c0fc32..70623ee 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -628,13 +628,21 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs) printk("No stack trace for guest user-mode\n"); return; - case PSR_MODE_FIQ: - case PSR_MODE_IRQ: - case PSR_MODE_SVC: - case PSR_MODE_ABT: - case PSR_MODE_UND: - printk("No stack trace for 32-bit guest kernel-mode\n"); - return; + case PSR_MODE_FIQ: + sp = regs->sp_fiq; + break; + case PSR_MODE_IRQ: + sp = regs->sp_irq; + break; + case PSR_MODE_SVC: + sp = regs->sp_svc; + break; + case PSR_MODE_ABT: + sp = regs->sp_abt; + break; + case PSR_MODE_UND: + sp = regs->sp_und; + break; #ifdef CONFIG_ARM_64 case PSR_MODE_EL1t: -- 1.8.1.4
Bamvor Jian Zhang
2013-Nov-04 08:01 UTC
[PATCH 2/2] xen: arm: add default kernel_start in xenctx
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com> --- tools/xentrace/xenctx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c index c4b7912..57e3277 100644 --- a/tools/xentrace/xenctx.c +++ b/tools/xentrace/xenctx.c @@ -69,10 +69,12 @@ struct symbol { guest_word_t kernel_stext, kernel_etext, kernel_sinittext, kernel_einittext, kernel_hypercallpage; -#if defined (__i386__) +#if defined (__i386__) || defined (__arm__) unsigned long long kernel_start = 0xc0000000; -#else +#elif defined (__x86_64__) unsigned long long kernel_start = 0xffffffff80000000UL; +#elif defined (__aarch64__) +unsigned long long kernel_start = 0xffffff8000000000UL; #endif static int is_kernel_text(guest_word_t addr) -- 1.8.1.4
Ian Campbell
2013-Nov-04 17:50 UTC
Re: [PATCH 2/2] xen: arm: add default kernel_start in xenctx
On Mon, 2013-11-04 at 16:01 +0800, Bamvor Jian Zhang wrote:> Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>Acked + applied, thanks.
Ian Campbell
2013-Nov-04 17:50 UTC
Re: [PATCH 1/2] xen: arm: enable 32bit kernel stack trace
On Mon, 2013-11-04 at 16:01 +0800, Bamvor Jian Zhang wrote:> Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>You added a trailing space to every line here. I stripped that and applied, thanks.
Bamvor Jian Zhang
2013-Nov-05 02:21 UTC
Re: [PATCH 1/2] xen: arm: enable 32bit kernel stack trace
>>>Ian Campbell <Ian.Campbell@citrix.com> wrote: > On Mon, 2013-11-04 at 16:01 +0800, Bamvor Jian Zhang wrote: > > Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com> > > You added a trailing space to every line here. I stripped that and > applied, thanks.sorry. i add this checker into my vimrc. it will never happen again.> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > >