WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

RE: [Xen-ia64-devel] [PATCH] xentrace buffer alignment

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Masaki Kanno" <kanno.masaki@xxxxxxxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] [PATCH] xentrace buffer alignment
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 24 Nov 2005 13:50:52 +0800
Delivery-date: Thu, 24 Nov 2005 05:50:43 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXwsJraos3zhUgmTXqX/n0OjhRqGQABAlzQAAEQN4A=
Thread-topic: [Xen-ia64-devel] [PATCH] xentrace buffer alignment
Sorry Kanno, I see what you mean now. ;-) The alignment directive is necessary 
there since they're dynamically marked on an allocated buf. Or how about adding 
padding bytes to avoid using compiler directive and ifdef? Then, still no need 
for "t_rec".

Thanks,
Kevin

>-----Original Message-----
>From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Tian, Kevin
>Sent: 2005年11月24日 13:18
>To: Masaki Kanno; xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>Subject: RE: [Xen-ia64-devel] [PATCH] xentrace buffer alignment
>
>Hi, Kanno,
>       First there's no need to add "align" for struct t_rec since theirs is a 
> uint64_t field
>inside which promises 8 bytes alignment by compiler.
>
>       Then I'm curious why unaligned fault is raised upon the second 
> structure t_buf.
>Since all 3 fields inside are unsigned integer, I think there's no need to 
>push any
>manual alignment to them. The caller should walk these fields by defined type. 
>;-)
>
>Thanks,
>Kevin
>
>>-----Original Message-----
>>From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>[mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Masaki Kanno
>>Sent: 2005年11月24日 12:36
>>To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>>Subject: [Xen-ia64-devel] [PATCH] xentrace buffer alignment
>>
>>Hi,
>>
>>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 small patch correct alignment of the trace buffer.
>>
>>Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
>>
>>Thanks,
>> kan
>>
>>diff -r 51f32d60536b xen/include/public/trace.h
>>--- a/xen/include/public/trace.h        Fri Nov 18 00:35:14 2005
>>+++ b/xen/include/public/trace.h        Thu Nov 24 11:43:40 2005
>>@@ -58,7 +58,11 @@
>>     uint64_t cycles;          /* cycle counter timestamp */
>>     uint32_t event;           /* event ID                */
>>     unsigned long data[5];    /* event data items        */
>>+#ifdef __ia64__
>>+} __attribute__((__aligned__(8)));
>>+#else
>> };
>>+#endif
>>
>> /*
>>  * This structure contains the metadata for a single trace buffer.  The head
>>@@ -69,7 +73,11 @@
>>     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.    */
>>+#ifdef __ia64__
>>+} __attribute__((__aligned__(8)));
>>+#else
>> };
>>+#endif
>>
>> #endif /* __XEN_PUBLIC_TRACE_H__ */
>>
>>
>>
>>_______________________________________________
>>Xen-ia64-devel mailing list
>>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>>http://lists.xensource.com/xen-ia64-devel
>
>_______________________________________________
>Xen-ia64-devel mailing list
>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-ia64-devel

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel