All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Peng Fan <van.freenix@gmail.com>,
	Julien Grall <julien.grall@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xen.org,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: Dom0 kernel panic when porting xen to new arm soc
Date: Mon, 22 Jun 2015 15:02:38 +0100	[thread overview]
Message-ID: <5588157E.2030701@citrix.com> (raw)
In-Reply-To: <5587EEE6.7030706@gmail.com>

On 22/06/15 12:17, Peng Fan wrote:
> I add debug log in this piece of code:
> void __init sanity_check_meminfo(void)
> 
> {
> 
> phys_addr_t memblock_limit = 0;
> int i, j, highmem = 0;
> phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1;
> 
> 
> printk("vmalloc_min virt %x phys %x\n", vmalloc_min - 1,
> __pa(vmalloc_min - 1));
> printk("vmalloc_limit %x\n", vmalloc_limit);
> 
> If use 512M for Dom0, I found vmalloc_limit is 0xf800000, vmalloc_min is
> 0xef800000, This comes to a question, why __pa(vmalloc_min - 1) + will
> make vmalloc_limit only 0xf800000 which is less than 128M. the pv stub
> does some runtime fixup for virt_to_phys here.
> Since vmalloc_limit is small, then all other memory bank in my platform
> is recoginied as highmem, then arm_lowmem_limit is 0, then kernel panic:
> "
> dma_contiguous_reserve_area(size 1800000, base 00000000, limit 00000000)
> CMA: failed to reserve 32 MiB
> Memory policy: Data cache writealloc
> Kernel panic - not syncing: ERROR: Failed to allocate 0x2000 bytes below
> 0x0.
> "
> 0xffffffff - 0xef8000000 is about 264M. So I choose 256M as the Dom0
> memory size. I do not have clear idea about this, current I am trying to
> use xl to boot DomU, so just use 256M for Dom0 here.

There use to be some issue with the way how the offset between physical
and virtual address was computed.

Do you use LPAE or short page table? Can you provide the xen log when
DOM0 is using 512MB?

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-06-22 14:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 14:09 Dom0 kernel panic when porting xen to new arm soc Peng Fan
2015-06-18 14:24 ` Julien Grall
2015-06-18 14:54 ` Ian Campbell
2015-06-19 13:22   ` Peng Fan
2015-06-20 10:19     ` Julien Grall
2015-06-20 14:08       ` Peng Fan
2015-06-20 14:47         ` Peng Fan
2015-06-22 10:20           ` Julien Grall
2015-06-22 11:17             ` Peng Fan
2015-06-22 14:02               ` Julien Grall [this message]
2015-06-23 13:03                 ` Peng Fan
2015-06-23 13:36                   ` Julien Grall
2015-06-23 13:56                     ` Peng Fan
2015-06-25 14:09                       ` Peng Fan
2015-06-26 16:27                         ` Julien Grall

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=5588157E.2030701@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=van.freenix@gmail.com \
    --cc=xen-devel@lists.xen.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.