<div dir="ltr"><div>Hello, </div><div><br></div>Good Job Phillipp,<div>I always guessed that we would need to tailor a BSP for each hypervisor. Regarding the different architectures, I think we may be able to get a consistent cross-architecture abstraction layer with some optional minor changes due to architecture specific optimizations (i.e. in some architectures it may be possible to isolate privileged instructions inside an function instead of virtualizing the complete function; this is the case of _Context_Switch in SPARC).</div>
<div><br></div><div><br></div><div>Regards, </div><div>Cláudio </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 2:22 PM, Philipp Eppelt <span dir="ltr"><<a href="mailto:philipp.eppelt@mailbox.tu-dresden.de" target="_blank">philipp.eppelt@mailbox.tu-dresden.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, it looks like it. But I think for each architecture, we can share<br>
the most parts of the BSP and separate the hypervisor specifics.<br>
<br>
I don't know much about virtualization on sparc/ppc/arm, so I can't say<br>
anything about these.<br>
<br>
Cheers<br>
Philipp<br>
<div><div class="h5"><br>
On 09/23/2013 03:16 PM, Gedare Bloom wrote:<br>
> Sounds good. Would it be a BSP for each hypervisor for each target CPU<br>
> type the hypervisor runs on?<br>
><br>
> -Gedare<br>
><br>
> On Mon, Sep 23, 2013 at 9:10 AM, Philipp Eppelt<br>
> <<a href="mailto:philipp.eppelt@mailbox.tu-dresden.de">philipp.eppelt@mailbox.tu-dresden.de</a>> wrote:<br>
>> Hi,<br>
>><br>
>> in the last days I reused my work on L4RTEMS to do a quick and dirty<br>
>> test of the new virtualization layer.<br>
>><br>
>> The implementation -which isn't working yet- showed, that we the<br>
>> i386/virtualpok BSP is a very good point to start, but the vCPU<br>
>> interface of L4Re brings it's own dependencies which must be added to<br>
>> include/ and in Makefile.am.<br>
>> I also had to extend the virtualizationalyerbsp.h file with these<br>
>> includes and a structure shared between L4Re and RTEMS. This struct<br>
>> accommodates a vCPU and console capability and a pointer to the vCPU<br>
>> state. They are filled in at start up by L4Re and can then be used by RTEMS.<br>
>><br>
>> The take away are two things:<br>
>> First, we might end up with an own BSP for each hypervisor.<br>
>> Second, as far as I can see now, they only differ in aspects of the<br>
>> layer, not in the drivers using the layer.<br>
>><br>
>> The code isn't on github yet, as I am short on time and have to sort<br>
>> things out first. The obstacle at the moment is to create a library in<br>
>> L4Re, which includes all L4Re dependencies and has only a few undefined<br>
>> references, which can be resolved by RTEMS.<br>
>><br>
>> Cheers<br>
>> Philipp<br>
>><br>
>><br>
>> On 09/20/2013 09:22 AM, Philipp Eppelt wrote:<br>
>>> Hi,<br>
>>><br>
>>> what did I do in my project?<br>
>>><br>
>>> I designed and implemented a virtualization layer, which should ease the<br>
>>> virtualization of RTEMS across different hypervisors.<br>
>>> To test the layer and because of the ARINC 653 compliance POK was chosen<br>
>>> as a proof-of-concept host OS.<br>
>>><br>
>>> The project was a partial success. The layer is designed, implemented<br>
>>> and a BSP is using it, and it is at least partially working.<br>
>>> I didn't succeed in changing POK so it can forward interrupts to<br>
>>> partitions reliably. But this is an POK related issue, which I think<br>
>>> won't be an issue on a host OS providing a vCPU abstraction. Also<br>
>>> implementing this for other architectures might be easier than for x86.<br>
>>><br>
>>> A console is printing hello World and sometimes under some circumstances<br>
>>> the base_sp sample printed output, too. But the latter is not reliable.<br>
>>><br>
>>> I have documented my efforts, including implementation issues, GDB traps<br>
>>> and where I left off on the wiki page [0].<br>
>>> Also explanations on how to port the i386/virtualpok BSP to other<br>
>>> hypervisors and how to port this approach to other architectures can be<br>
>>> found there. The latter is pretty abstract, as I don't know much about<br>
>>> the other architectures(arm, ppc, sparc).<br>
>>><br>
>>> I provide two patches:<br>
>>> * Split of the i386 CPU between score/cpu and libcpu. The interrupt<br>
>>> handling was moved to libcpu and two new CPU variants were introduced<br>
>>> there: Native and virtual. The native one works like before but the<br>
>>> virtual one calls the virtualization layer instead of executing cli,sti<br>
>>> or hlt. The list of affected functions is documented in the wiki[0].<br>
>>> BUT: This patch won't be merged, as includes in cpukit from libcpu<br>
>>> aren't allowed (but it works). But before the discussion about a new<br>
>>> configuration option isn't finished and the option is implemented there<br>
>>> is no other way to achieve this.<br>
>>><br>
>>> * A new i386 BSP is introduced: virtualpok. It is the corresponding BSP<br>
>>> to the virtual i386 CPU model and brings along the virtualization layer<br>
>>> as two header files in it's include/ directory. A console driver, clock<br>
>>> driver and IRQ management is implemented and as far as possible tested<br>
>>> on POK.<br>
>>><br>
>>><br>
>>> If you have questions on the work, I'd be happy to answer them.<br>
>>><br>
>>> Cheers,<br>
>>> Philipp<br>
>>><br>
>>> [0]<br>
>>> <a href="http://wiki.rtems.org/wiki/index.php/GSOC_2013_-_Paravirtualization_of_RTEMS" target="_blank">http://wiki.rtems.org/wiki/index.php/GSOC_2013_-_Paravirtualization_of_RTEMS</a><br>
>>> _______________________________________________<br>
>>> rtems-devel mailing list<br>
>>> <a href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br>
>>> <a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> rtems-devel mailing list<br>
>> <a href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br>
>> <a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
<br>
_______________________________________________<br>
</div></div>rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
</blockquote></div><br></div>