On 01.06.21 09:32, Prashant Kalikotay wrote:
> 
> On 31/05/21 10:16 PM, Jan Kiszka wrote:
>> On 28.05.21 14:10, Prashant Kalikotay wrote:
>>> Dear all,
>>>
>>>             I am trying to write configuration files for the root and
>>> the non-root cells for an arm64 based system. I have checked the video
>>> https://youtu.be/7fiJbwmhnRw and also the pdf. I could just infer from
>>> these that I have to write the config files using the already existing
>>> ones eg: amd-seatle.c and other files. But what I am not able to
>>> understand is how do I come up with the different values in the config
>>> files as in other files.
>>>
>>> For Example:
>>>
>>> This is small portion of amd-seattle.c how do we come up with the values
>>> in the mem_regions[] as 20, irqchips[] as 3, hypervisor_memory.
>> These a C-structures - the array sizes derive from the number of
>> elements we fill in below.
>>
>>> phys_start = 0x83e0000000, and all othe r values in the config files.
>>> Which document has been used. Any pointer to any of the documents of the
>>> various config files listed in the configs would be a lot helpful.
>>>
>> Concepts should have been explained in the tutorial you cited, details
>> are unfortunately not specified. Therefore, you need to study existing
>> configs and translate that knowledge to your specific target.
>>
>> If you understand that partitioning concepts and mechanisms in
>> Jailhouse, doing so should be possible (you can always ask for concrete
>> details here). If not, even a detailed specification of the config
>> format would likely not help because you always have to apply that to
>> your concrete case, and the abstraction level of Jailhouse is fairly low.
>>
>> Jan
>>
> Thanks for your reply Jan,
> 
>                                        I am trying to write
> configuration file for a arm64 based system. My doubt is how to go about
> allocating memory regions for the root and non-root cells. How do I come
> up with these addresses
> 
> phys_start = _/0x83e0000000 /_. 
> 

Memory regions describe portions of the physical address space, mapped
into a cell (guest).

For the root cell, study how the real system looks like (device tree,
/proc/iomem of a booted Linus). On x86, the latter is what "jailhouse
config create" does as well. For other archs, we are lacking comparable
support, but the task is often simpler.

If you want to hand out a certain amount of RAM to a non-root cell, you
need to

 - make sure that the root cell does not use that (mem=... or device
   tree reservation)
 - define a memory region in the non-root cell config with the
   corresponding phys_start and size values
 - decide whether to map it 1:1 (virt_start == phys_start) or to make it
   appear in the cell at a different address
 - tell the cell where to find it (e.g. via device tree -> jailhouse
   cell linux ... will do that on startup)

HTH,
Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/90615fdb-97e3-a700-936b-9e348e859880%40siemens.com.

Reply via email to