* xen_guest_init() failed
@ 2014-10-28 15:51 Iurii Konovalenko
2014-10-28 17:20 ` Julien Grall
0 siblings, 1 reply; 3+ messages in thread
From: Iurii Konovalenko @ 2014-10-28 15:51 UTC (permalink / raw)
To: xen-devel, Konrad Rzeszutek Wilk
Hello, all!
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.
Best regards.
Iurii Konovalenko | Senior Software Engineer
GlobalLogic
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: xen_guest_init() failed
2014-10-28 15:51 xen_guest_init() failed Iurii Konovalenko
@ 2014-10-28 17:20 ` Julien Grall
2014-10-29 9:21 ` Iurii Konovalenko
0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2014-10-28 17:20 UTC (permalink / raw)
To: Iurii Konovalenko, xen-devel, Konrad Rzeszutek Wilk, Ian Campbell,
Stefano Stabellini
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: xen_guest_init() failed
2014-10-28 17:20 ` Julien Grall
@ 2014-10-29 9:21 ` Iurii Konovalenko
0 siblings, 0 replies; 3+ messages in thread
From: Iurii Konovalenko @ 2014-10-29 9:21 UTC (permalink / raw)
To: Julien Grall; +Cc: Ian Campbell, Stefano Stabellini, xen-devel
Thanks a lot, Julien!
0xb0000000-0xb0020000 region points to RAM area in R-Car H2 SoC.
I've changed grant-table region to 0xc0000000-0xc0020000, that is
reserved area, and now everything works fine.
I'm sorry for my opaqueness and thanks again for your help.
Best regards.
Iurii Konovalenko | Senior Software Engineer
GlobalLogic
On Tue, Oct 28, 2014 at 7:20 PM, Julien Grall <julien.grall@linaro.org> wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-29 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 15:51 xen_guest_init() failed Iurii Konovalenko
2014-10-28 17:20 ` Julien Grall
2014-10-29 9:21 ` Iurii Konovalenko
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.