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] [PATCH 6 of 8] Xen: remove run_in_exception_handler() an

To: Keir Fraser <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 6 of 8] Xen: remove run_in_exception_handler() and recode its only caller
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Mon, 7 Mar 2011 15:56:21 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Mar 2011 07:57:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110307153841.GA28479@xxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C99AA4B8.143F7%keir.xen@xxxxxxxxx> <C99AA722.14417%keir.xen@xxxxxxxxx> <20110307153841.GA28479@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
At 15:38 +0000 on 07 Mar (1299512321), Tim Deegan wrote:
> At 15:15 +0000 on 07 Mar (1299510944), Keir Fraser wrote:
> > On 07/03/2011 15:05, "Keir Fraser" <keir.xen@xxxxxxxxx> wrote:
> > > On 07/03/2011 11:26, "Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:
> > >> This is needed to compile xen with clang, which can't handle using a
> > >> function name in an asm immediate.
> > > 
> > > Actually run_in_exception_handler() does have another user, in ns16550.c.
> > > Although non-essential, it makes the 'd' debug key much more useful when
> > > running the UART in polled mode.
> > > 
> > > So I suggest we keep run_in_exception_handler but modify it to pass the
> > > function pointer in (say) rAX.
> > 
> > Like the attached patch (against latest tip).
> 
> Sorry, I had missed that other user.  I'll see if I can find a way to
> make clang use the function address directly; if not, I'd be inclined to 
> have dump_execution_state have its own ID anyway, to keep %rax valid(er)
> in BUG()s.

Turns out to be very straightforward: another level of indirection makes
the parser happy.  If it's OK with you, I'll revert 22987:3147f2d1c6fb
and apply this instead:

diff -r 3147f2d1c6fb xen/include/asm-x86/bug.h
--- a/xen/include/asm-x86/bug.h Mon Mar 07 15:47:59 2011 +0000
+++ b/xen/include/asm-x86/bug.h Mon Mar 07 15:48:32 2011 +0000
@@ -22,7 +22,7 @@ struct bug_frame {
     asm volatile (                                 \
         "ud2 ; ret %0" BUG_STR(1)                  \
         : : "i" (BUGFRAME_run_fn),                 \
-            "i" (fn) )
+            "i" (&(fn)) )
 
 #define WARN()                                     \
     asm volatile (                                 \

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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

<Prev in Thread] Current Thread [Next in Thread>