TUD-OS / NRE

NOVA runtime environment (official branch)
GNU General Public License v2.0
33 stars 12 forks source link

Option to use upstream NOVA version #32

Open parthy opened 11 years ago

parthy commented 11 years ago

If I am not mistaken, the two defines in the UTCB are there to remove custom additions to NOVA from the setup. Is that correct? If so, it doesn't seem to be working, The assertion size > 0 in ChildHip.h:L60 fails. Is there anything else to be taken care of to get NRE to work with the most recent upstream NOVA version? Because that would be nice for testing.

Nils-TUD commented 11 years ago

Yes, the defines control whether the NOVA change is present and whether it should be used.

There are 2 other changes though, that prevent NRE to work with upstream NOVA. The first is that the aux field in Hip_mem (kernel/nova/include/hip.hpp) needs to be of type mword, not uint32. The second is that I've added a hypercall for debugging (that assigns a name to a Pd), which has to be disabled (e.g. in nre/include/Syscalls.h -> pd_ctrl). Perhaps I should just ignore it if the hypercall doesn't exist...

Apart from that, atm you don't really benefit from using upstream NOVA because the only difference is the new naming of header files :) And of course I'm always trying to update as soon as possible, although I can understand the desire of also being able to use upstream NOVA.

udosteinberg commented 11 years ago

Apart from that, atm you don't really benefit from using upstream NOVA because the only difference is the new naming of header files :) And of course I'm always trying to update as soon as possible, although I can understand the desire of also being able to use upstream NOVA.

The reasoning is that we want to be able to use internal development branches of the NOVA microhypervisor with NRE, without having to port everything in our development branch over to the NRE tree. Otherwise NRE is hardly usable as a framework for any kind of hypervisor development or testing.

For me it would be okay if there was a simple build switch (makefile target, define, or whatever) where you could tell NRE that you want to build it for an unmodified vanilla hypervisor. I managed to get it to work with the steps you outlined above, but that's more than just changing one setting somewhere.

hrniels commented 11 years ago

Ok, I see. IMHO, the easiest and best way would be to just change the aux field to be an mword in upstream NOVA :) At least I don't see any reason against it (it isn't space critical) and it would allow the userlands to put a pointer in there. The other change is no longer necessary because I just ignore it now if the hypercall doesn't exist. So, in order to use upstream NOVA, the only thing you would need to do is change the USE_UTCB_KERNEL_EXT define.

Without the change in upstream NOVA it gets difficult. Of course I could insert a switch in e.g. the b script of NRE which changes that via sed in the NOVA source (if the location is given), but IMO that is no option. I don't see any other way atm, because NRE needs to put a pointer in the aux field.

blitz commented 11 years ago

You could store the pointer somewhere else. It is just not convenient...

Nils-TUD commented 11 years ago

Of course. But since there is no real pressure to do that, I don't see why I should take the much more inconvenient way if one tiny change in NOVA without any disadvantage prevents it.

blitz commented 11 years ago

Then we stay at the current stalemate.