All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	xen-devel@lists.xen.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: xen_guest_init() failed
Date: Tue, 28 Oct 2014 17:20:40 +0000	[thread overview]
Message-ID: <544FD068.1070403@linaro.org> (raw)
In-Reply-To: <CABc08z+84e-ZEb-5D95bU-105mcNABE5gWaWe_PD9jcF-XEqBA@mail.gmail.com>

On 10/28/2014 03:51 PM, Iurii Konovalenko wrote:
> Hello, all!

Hello Iurii,

> I try to bring up Xen on Renesas Lager board (r8a7790 SoC - R-Car H2).
> Xen revision is 4.4.
> I try to run Linux (kernel 3.14 + LTSI patches) as Dom0.
> But I failed to start Dom0.
> After a bit of investigation, I've founded following.
> In kernel i have patch efaf30a3 "xen/grant: Implement an grant frame
> array struct (v3)." by Konrad Rzeszutek Wilk. It makes changes, one of
> which is adding to arch/arm/xen/enlighten.c in function
> xen_guest_init(void) call of function
> gnttab_setup_auto_xlat_frames(phys_addr_t addr) with argument, that
> points to memory in RAM.
> gnttab_setup_auto_xlat_frames in tern call xen_remap() with this
> address as an argument. xen_remap() is defined to ioremap_cache(), but
> as it is ioremap, it fails to remap RAM memory - in file
> arch/arm/mm/ioremap.c in function __arm_ioremap_pfn_caller():
> 
>     /*
>      * Don't allow RAM to be mapped - this causes problems with ARMv6+
>      */
> 
>     if (WARN_ON(pfn_valid(pfn)))
>         return NULL;
> 
> Could you please provide any suggestions how to left functionality,
> provided by this patch, but avoid failing of remapping.

Linux is getting the grant-table region from the device tree. For DOM0,
this region has been chosen by Xen. The default value are
0xb0000000-0xb0020000. This region should not overlap with any device
MMIO mapped to Xen nor the whole RAM.

If the memory layout of your platform uses this region (for device,
RAM...), you have to find a free space and specify it in the specific
code for your platform.

You can give a look to xen/arch/arm/platforms/xgene-storm.c for an
example. Those fields are called dom0_gnttab_start and dom0_gnttab_size.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-10-28 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 15:51 xen_guest_init() failed Iurii Konovalenko
2014-10-28 17:20 ` Julien Grall [this message]
2014-10-29  9:21   ` Iurii Konovalenko

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=544FD068.1070403@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=iurii.konovalenko@globallogic.com \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.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.