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-devel

Re: [Xen-devel] Error reporting capabilities for libxc

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Error reporting capabilities for libxc
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Mon, 23 Oct 2006 19:00:17 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 23 Oct 2006 11:00:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <3AAA99889D105740BE010EB6D5A5A3B202A3B1@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3AAA99889D105740BE010EB6D5A5A3B202A3B1@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Tue, Sep 26, 2006 at 01:58:11PM +0100, Ian Pratt wrote:
> > On 26/9/06 12:45, "Stephen C. Tweedie" <sct@xxxxxxxxxx> wrote:
> > 
> > >> So, I've prototyped a simple error reporting mechanism for 
> > libxc. The 
> > >> idea is we first define an enum for the broad classes of 
> > errors which can occur.
> > > ...
> > > 
> > >> Any way, the upshot of all this work:
> > >>   # xm create error
> > >>   Using config file "error".
> > >>   Error: [2, 'Kernel ELF architecture 3 does not match Xen 
> > >> architecture 62']
> > > 
> > > IMHO this is sorely needed.  Any comments from XenSource people?
> > 
> > I'd agree something like this is necessary in the 3.0.4 
> > timeframe. I'll let one of the guys more acquainted with xend 
> > comment in detail. There's also the question of how this will 
> > integrate with the proposed 'XenAPI'.
> 
> Yep, definitely needs to happen. However, I think we should at least
> discuss alternative potentially less clunky implementation methods.
> Perhaps we should use a thread local errno and error string variables?

Attached is an update to the original patch which annotates the static
variables with __thread so that they are setup per-thread. It also adds
more informative error reporting for bad kernels.

The only issue is that __thread is a GCC specific extension, so I'm not
sure this will work for the Solaris folks ?

  http://gcc.gnu.org/onlinedocs/gcc/Thread_002dLocal.html

The other option is to use the POSIX APIs  pthread_getspecific & 
pthread_setspecific. It'll make the code alot more cumbersome, but
would certainly be portable. I'm certainly willing to do this though
if need be...

  Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

Attachment: xen-libxc-errors9.patch
Description: Text document

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