[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xen_guest_init() failed



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@xxxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.