xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xiong Y Zhang <xiong.y.zhang@intel.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [bug]xen 4.10 + dom0 4.15 couldn't boot up
Date: Thu, 1 Feb 2018 10:22:28 +0100	[thread overview]
Message-ID: <b0018572-51f5-8e07-bc15-c1576b18b3da@suse.com> (raw)
In-Reply-To: <5A72E89002000078001A43DB@suse.com>

On 01/02/18 10:14, Jan Beulich wrote:
>>>> On 01.02.18 at 08:29, <jgross@suse.com> wrote:
>> On 01/02/18 07:20, Zhang, Xiong Y wrote:
>>> (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
>>> (XEN) ----[ Xen-4.11-unstable  x86_64  debug=y   Not tainted ]----
>>> (XEN) CPU:    0
>>> (XEN) RIP:    e033:[<ffffffff8103ca29>]
>>> (XEN) RFLAGS: 0000000000000292   EM: 1   CONTEXT: pv guest (d0v0)
>>> (XEN) rax: 0000000000000000   rbx: ffffffff81e05fe0   rcx: 0000000000000000
>>> (XEN) rdx: 0000000000000030   rsi: ffffffff82203f04   rdi: ffffffff82451f60
>>> (XEN) rbp: ffffffff82203f08   rsp: ffffffff82203e20   r8:  ffffffff82203f08
>>> (XEN) r9:  00000000ffffffff   r10: ffffffff82203f0c   r11: 0000000000000000
>>> (XEN) r12: ffffffff82203f0c   r13: ffffffff82203e88   r14: ffffffff82203f00
>>> (XEN) r15: ffffffff82203e98   cr0: 000000008005003b   cr4: 00000000003526e0
>>> (XEN) cr3: 00000003facc5000   cr2: 0000000000000028
>>> (XEN) fsb: 0000000000000000   gsb: 0000000000000000   gss: 0000000000000000
>>> (XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
>>> (XEN) Guest stack trace from rsp=ffffffff82203e20:
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 ffffffff8103ca29
>>> (XEN)    000000010000e030 0000000000010092 ffffffff82203e68 000000000000e02b
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    ffffffff82451f60 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 ffffffff82451f60 ffffffff82203f08
>>> (XEN)    ffffffff82203f0c ffffffff82203f04 ffffffff82203f00 ffffffff82203f1c
>>> (XEN)    ffffffff8103d611 ffffffff82203f10 ffffffff82203f14 ffffffff82203f18
>>> (XEN)    0000000000003027 0000000000000000 0000000080000008 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 ffffffff8281ba11 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>>> (XEN)    0f00000060c0c748 ccccccccccccc305 cccccccccccccccc cccccccccccccccc
>>> (XEN)    cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
>>> (XEN)    cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
>>> (XEN)    cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
>>> (XEN)    cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
>>> (XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds.
>>> (XEN) APIC error on CPU0: 40(00)
>>> (XEN) Resetting with ACPI MEMORY or I/O RESET_REG.
>>>
>>> addr2line -f -e vmlinux ffffffff8103ca29
>>> init_scattered_cpuid_features
>>> arch/x86/kernel/cpu/scattered.c:38
>>
>> And this is the problem: it seems as if the compiler now generates an
>> access via %gs in this function, but this segment hasn't been setup at
>> this stage of the boot process.
>>
>> I'm trying to move up initialization of the %gs segment.
> 
> This can be done _really_ early, as our old XenoLinux kernel shows
> (4.4 based):
> 
> startup_64:
> 	movq $(init_thread_union+THREAD_SIZE-8),%rsp
> 
> 	/* rsi is pointer to startup info structure.
> 	   pass it to C */
> 	movq %rsi,%rdi
> 
> 	/* Set up %gs.
> 	 *
> 	 * The base of %gs always points to the bottom of the irqstack
> 	 * union.  If the stack protector canary is enabled, it is
> 	 * located at %gs:40.  Note that, on SMP, the boot cpu uses
> 	 * init data section till per cpu areas are set up.
> 	 */
> 	movl	$MSR_GS_BASE,%ecx
> 	movq	$INIT_PER_CPU_VAR(irq_stack_union),%rax
> 	cdq
> 	wrmsr
> 
> I won't make any guarantees on the applicability of everything the
> comment says, though.

Thanks for the confirmation that I'm on the right track. :-)


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      parent reply	other threads:[~2018-02-01  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  5:28 [bug]xen 4.10 + dom0 4.15 couldn't boot up Zhang, Xiong Y
2018-01-29  5:45 ` Juergen Gross
2018-01-30  0:33   ` Zhang, Xiong Y
2018-01-30 10:01     ` Juergen Gross
2018-02-01  6:20       ` Zhang, Xiong Y
2018-02-01  7:29         ` Juergen Gross
2018-02-01  9:14           ` Jan Beulich
     [not found]           ` <5A72E89002000078001A43DB@suse.com>
2018-02-01  9:22             ` Juergen Gross [this message]

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=b0018572-51f5-8e07-bc15-c1576b18b3da@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xiong.y.zhang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).