Skip to contentSkip to conversation

xentrace buffer alignment

PATCH In review Masaki Kanno 2 participants 2 messages Nov 24, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xentrace buffer alignment

Hi,

I'm working to xentrace execution on ia64 now.

When the "tbuf_size=" option was added,
Xen cannot be booted and show the following messages.

(XEN) About to call init_trace_bufs()
(XEN) Xen trace buffers: initialised
(XEN) About to call schedulers_start dom0=f0000000040ec100, idle0_dom=f0000000040d2e10 (XEN) ia64_handle_reflection: reflecting with priv=0!!

Unaligned Reference fault occurred in trace function. This patch correct alignment of the trace buffer.

Thanks,
kan

xen/include/public/trace.h Thu Nov 24 20:49:02 2005 renamed from xen/include/public/trace.h Fri Nov 18 00:35:14 2005 +1 -1
diff -r 51f32d60536b xen/include/public/trace.h
@@ -69,7 +69,7 @@
     unsigned int  prod;      /* Next item to be produced by Xen.           */
     unsigned int  nr_recs;   /* Number of records in this trace buffer.    */
     /* 'nr_recs' records follow immediately after the meta-data header.    */
-};
+} __attribute__((__aligned__(8))); /* 8 bytes alignment for ia64           */
 
 #endif /* __XEN_PUBLIC_TRACE_H__ */
#1 lore raw

I've already replied on the ia64-devel list. I'd like to know more about why explicit alignment is required.

-- Keir

Quoted 42 lines · Masaki Kanno

Hi,

I'm working to xentrace execution on ia64 now.

When the "tbuf_size=" option was added,
Xen cannot be booted and show the following messages.

(XEN) About to call init_trace_bufs()
(XEN) Xen trace buffers: initialised
(XEN) About to call schedulers_start dom0=f0000000040ec100, idle0_dom=f0000000040d2e10 (XEN) ia64_handle_reflection: reflecting with priv=0!!

Unaligned Reference fault occurred in trace function. This patch correct alignment of the trace buffer.

Thanks,
kan

diff -r 51f32d60536b xen/include/public/trace.h

xen/include/public/trace.h Thu Nov 24 20:49:02 2005 renamed from xen/include/public/trace.h Fri Nov 18 00:35:14 2005 +0 -0
@@ -69,7 +69,7 @@
     unsigned int  prod;      /* Next item to be produced by Xen.      
     */
     unsigned int  nr_recs;   /* Number of records in this trace 

buffer. */

     /* 'nr_recs' records follow immediately after the meta-data 

header. */

xen/include/public/trace.h Thu Nov 24 20:49:02 2005 renamed from xen/include/public/trace.h Fri Nov 18 00:35:14 2005 +1 -1
-};
+} __attribute__((__aligned__(8))); /* 8 bytes alignment for ia64      
     */
 
 #endif /* __XEN_PUBLIC_TRACE_H__ */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel