From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 6 of 8] Xen: remove run_in_exception_handler() and recode its only caller Date: Mon, 07 Mar 2011 16:00:06 +0000 Message-ID: References: <20110307155621.GB28479@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110307155621.GB28479@whitby.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 07/03/2011 15:56, "Tim Deegan" wrote: > 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" wrote: >>> >>> 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: If you've successfully both build- and run-tested it with gcc then it's fine with me. It needs testing as it's a moderately skanky construct in the first place. -- Keir > 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.