All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>,
	"msd+xen-devel@msd.im" <msd+xen-devel@msd.im>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [Xen EFI] Impossible to limit the dom0 memory
Date: Thu, 25 Jan 2018 12:16:12 +0100	[thread overview]
Message-ID: <0f6fc9a5-4bbf-3ad8-6f87-99723b445246@suse.com> (raw)
In-Reply-To: <5A69C21602000078001A24A3@prv-mh.provo.novell.com>

On 25/01/18 11:40, Jan Beulich wrote:
>>>> On 25.01.18 at 11:25, <msd+xen-devel@msd.im> wrote:
>>>  Xen doesn't crash at all.
> 
> Did you read the above? it is being confirmed by ...
> 
>> With this file, it works, Xen boots :
>>
>> ```
>> [global]
>> default=xen
>>
>> [xen]
>> options=loglvl=all com1=115200,8n1 console=com1,vga
>> kernel=vmlinuz root=/dev/md2 ro rootdelay=10 noquiet nosplash 
>> earlyprintk=xen
>> ramdisk=initrd.img
>> ```
>>
>> With this file, I have just added "dom0_mem=1G,max:1G", Xen crashes :
>>
>> ```
>> [global]
>> default=xen
>>
>> [xen]
>> options=loglvl=all com1=115200,8n1 console=com1,vga dom0_mem=1G,max:1G
>> kernel=vmlinuz root=/dev/md2 ro rootdelay=10 noquiet nosplash 
>> earlyprintk=xen
>> ramdisk=initrd.img
>> ```
>>
>> I attached the boot logs "dom0_crash_with_dom0_memory.txt". The last 
>> line is "(XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds."
> 
> ... this line you observe. Taking further lines from the log you've
> provided subsequently:
> 
> (XEN) d0v0: unhandled page fault (ec=0003)                                                                                                                                                    
> 
> This tells us that Dom0 didn't install a page fault handler yet.
> 
> (XEN) Pagetable walk from ffffffff82565200:                                                                                                                                                   
> (XEN)  L4[0x1ff] = 000000084600e067 000000000000200e                                                                                                                                          
> (XEN)  L3[0x1fe] = 000000084600f067 000000000000200f                                                                                                                                          
> (XEN)  L2[0x012] = 0000000846647067 0000000000002647                                                                                                                                          
> (XEN)  L1[0x165] = 0010000846565065 0000000000002565                                                                                                                                          
> 
> This tells us (together with the page fault error code) that the
> Dom0 kernel tried to provide memory as kernel stack which
> can't be written. This may be a Dom0 kernel stack overflow,

Really? Why do you think this is related to the stack?

The error code just tells us it was a write access. %rsp is
ffffffff82003cb0, while %cr2 is ffffffff82565200.

To me it seems as if the access was via %rbx.

It would really help to know which function caused the access. As the
stack contains some parts of the last messages issued I suspect this
is related to EFI code.

> but there may also be other reasons. At this point I can't
> exclude there being some root cause in Xen, but the issue
> needs to be investigated from the Dom0 kernel side.

So having a more readable backtrace would really help.

Guillaume, can you try to get symbol+offset for the values on the stack
looking like kernel code addresses (e.g. everything starting with
"ffffffff82")?


Juergen

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

  parent reply	other threads:[~2018-01-25 11:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 11:18 [Xen EFI] Impossible to limit the dom0 memory msd+xen-devel
2018-01-23 13:39 ` Jan Beulich
2018-01-23 17:43   ` msd+xen-devel
2018-01-24  7:43     ` Jan Beulich
2018-01-25 10:25       ` msd+xen-devel
2018-01-25 10:40         ` Jan Beulich
2018-01-25 11:16           ` msd+xen-devel
2018-01-25 11:16           ` Juergen Gross [this message]
2018-01-25 11:20             ` msd+xen-devel
2018-01-25 12:22               ` Juergen Gross
2018-01-25 16:07                 ` msd+xen-devel
2018-11-30 15:12                   ` msd+xen-devel
2018-12-03  8:25                     ` Jan Beulich
2018-12-03  9:08                       ` msd+xen-devel
2018-01-25 11:21             ` Jan Beulich
2018-01-25 10:28       ` msd+xen-devel

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=0f6fc9a5-4bbf-3ad8-6f87-99723b445246@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=msd+xen-devel@msd.im \
    --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.