All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 2/2] Xen/x86: Improve information from domain_crash_synchronous
Date: Thu, 5 Sep 2013 10:44:39 +0100	[thread overview]
Message-ID: <52285287.2070208@citrix.com> (raw)
In-Reply-To: <522859C402000078000F0AF8@nat28.tlf.novell.com>

On 05/09/13 09:15, Jan Beulich wrote:
>>>> On 04.09.13 at 20:18, Andrew Cooper <andrew.cooper3@citrix.com> 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.

This is for the benifit of print_symbol(), which will now give
create_bounce_frame()+some rather than trap_nop()+loads.

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

But in an unlikely section, %rip is shifted quite a lot from %rip of the
code immediately before.  This is also for the benefit of print_symbol()
which will pick up the {compat_,}create_bounce_frame rather than the
global symbol surrounding the unlikely section.

~Andrew

  reply	other threads:[~2013-09-05  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 18:18 [PATCH RFC 0/2] Improvements for domain_crash_synchronous Andrew Cooper
2013-09-04 18:18 ` [PATCH 1/2] x86/traps: Record last extable faulting address Andrew Cooper
2013-09-04 18:18 ` [PATCH 2/2] Xen/x86: Improve information from domain_crash_synchronous Andrew Cooper
2013-09-05  8:15   ` Jan Beulich
2013-09-05  9:44     ` Andrew Cooper [this message]
2013-09-05  9:51       ` Jan Beulich
2013-09-05  9:57         ` Andrew Cooper
2013-09-05 10:17           ` Jan Beulich
2013-09-05 12:57             ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52285287.2070208@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.