From: "Jan Beulich" Subject: Re: [PATCH 2/2] Xen/x86: Improve information from domain_crash_synchronous Date: Thu, 05 Sep 2013 09:15:32 +0100 Message-ID: <522859C402000078000F0AF8@nat28.tlf.novell.com> References: <1378318727-29518-1-git-send-email-andrew.cooper3@citrix.com> <1378318727-29518-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VHUis-00006H-Lk for xen-devel@lists.xenproject.org; Thu, 05 Sep 2013 08:15:26 +0000 In-Reply-To: <1378318727-29518-3-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 04.09.13 at 20:18, Andrew Cooper wrote: > As it currently stands, the string "domain_crash_sync called from entry.S" is > not helpful at identifying why the domain was crashed, and a debug build of > Xen doesn't help the matter > > This patch improves the information printed, by pointing to where the crash > decision was made. Looks quite useful. > --- a/xen/arch/x86/x86_64/compat/entry.S > +++ b/xen/arch/x86/x86_64/compat/entry.S > @@ -263,6 +263,7 @@ ENTRY(compat_int80_direct_trap) > /* {[ERRCODE,] EIP, CS, EFLAGS, [ESP, SS]} */ > /* %rdx: trap_bounce, %rbx: struct vcpu */ > /* On return only %rbx and %rdx are guaranteed non-clobbered. */ > +.globl compat_create_bounce_frame > compat_create_bounce_frame: Is the addition above a left-over? I don't see any use of the label outside of this file. > @@ -329,7 +330,12 @@ UNLIKELY_END(compat_bounce_failsafe) > movzwl TRAPBOUNCE_cs(%rdx),%eax > /* Null selectors (0-3) are not allowed. */ > testl $~3,%eax > - jz domain_crash_synchronous > +.Lcompat_bounce_null_selector: > +UNLIKELY_START(z, compat_bounce_null_selector) > + lea .Lcompat_bounce_null_selector(%rip), %rdi > + jmp asm_domain_crash_synchronous > + ud2a > +UNLIKELY_END(compat_bounce_null_selector) Here and further down you don't really need the label at the start of the unlikely section - the place can as well be identified by using lea (%rip), %rdi inside that section (the place is still unique, just outside the original code stream, i.e. just slightly more difficult to re-associate). Jan