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

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



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@xxxxxxxxxx>
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@xxxxxxxxxx>
---
 tools/xentrace/xenctx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.