diff mbox

[Xen-devel,v9,00/18] xenctx: Many changes.

Message ID 1396542252.4211.135.camel@kazak.uk.xensource.com
State Superseded
Headers show

Commit Message

Ian Campbell April 3, 2014, 4:24 p.m. UTC
On Wed, 2014-04-02 at 12:03 -0400, Don Slutz wrote:
> Add more functionality to xenctx.

I had acked and was just about to apply but unfortunately this doesn't
build on ARM:

        xenctx.c: In function ‘print_stack_word’:
        xenctx.c:762:16: error: ‘FMT_16B_WORD’ undeclared (first use in this function)
        xenctx.c:762:16: note: each undeclared identifier is reported only once for each function it appears in
        
ARM doesn't have any 16-bit modes so I suppose you could use #ifdef
FMT_16B_WORD or just define it for ARM and arm64, %04llx would be
correct for both I think.

        xenctx.c: At top level:
        xenctx.c:759:13: error: ‘print_stack_word’ defined but not used [-Werror=unused-function]

There is an #endif from a NO_TRANSLATION right before print_stack_word
and an #ifndef NO_TRANSLATION right after, so I think you can just
remove them and incorporate print_stack_word into one big NO_TRANSLATION
region.

On arm64 there is an additional one compared with arm32:

        xenctx.c: In function 'usage':
        xenctx.c:1074:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'long long unsigned int' [-Werror=format=]
                 kernel_start);
                 ^
        
kernel_addr is an unsigned long long but FMT_64B_WORD is a %#lx on
aarch64. I think this is wrong on aarch64 and the patch below makes it
right, I think, so if you insert that at the start of your series this
one should go away.

Unfortunately that last one was from the first patch in the series or
I'd have committed at least some of it.

Building arm stuff is more faff than I would ask a non-ARM developer to
go through, if you want to then [0] is the place to look, otherwise feel
free to make a best effort by inspection and I'll try building v10 for
you.

[0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling

Ian.

8<----------------------------------------

From 1f6bd5e1157d99a1b075d9386410d5a59eb85d69 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Thu, 3 Apr 2014 17:13:00 +0100
Subject: [PATCH] xenctx: Correct FMT_??B_WORD for arm64.

These should all be unsigned long long to match various variables used
in the
code, same as x86_64.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Don Slutz April 3, 2014, 11:27 p.m. UTC | #1
On 04/03/14 12:24, Ian Campbell wrote:
> On Wed, 2014-04-02 at 12:03 -0400, Don Slutz wrote:
>> Add more functionality to xenctx.
>
>
> Building arm stuff is more faff than I would ask a non-ARM developer to
> go through, if you want to then [0] is the place to look, otherwise feel
> free to make a best effort by inspection and I'll try building v10 for
> you.

I have have done the "best effort by inspection".  v10 posted

    -Don Slutz
> [0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling
>
> Ian.
>
>
Ian Campbell April 4, 2014, 8:34 a.m. UTC | #2
On Thu, 2014-04-03 at 19:27 -0400, Don Slutz wrote:
> On 04/03/14 12:24, Ian Campbell wrote:
> > On Wed, 2014-04-02 at 12:03 -0400, Don Slutz wrote:
> >> Add more functionality to xenctx.
> >
> >
> > Building arm stuff is more faff than I would ask a non-ARM developer to
> > go through, if you want to then [0] is the place to look, otherwise feel
> > free to make a best effort by inspection and I'll try building v10 for
> > you.
> 
> I have have done the "best effort by inspection".  v10 posted

Thank!
diff mbox

Patch

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 7275a00..47712ab 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -57,8 +57,8 @@  typedef uint64_t guest_word_t;
 #elif defined(__aarch64__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
-#define FMT_32B_WORD "%08lx"
-#define FMT_64B_WORD "%016lx"
+#define FMT_32B_WORD "%08llx"
+#define FMT_64B_WORD "%016llx"
 #endif
 
 struct symbol {