Overmap from sigma0 to roottask
Norman Feske <[email protected]> Wed, 04 Aug 2010 10:46:01 +0200
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have noticed a slight inconsistency in the overmap semantics of Pistachio (using the new mapping database). As far as I understand the code in 'linear_ptab_walker.cc', Pistachio is supposed to support overmap. However, I ran into a situation where roottask tried to map a (non-RAM, somewhere beyond 0xd0000000) page from Sigma0 (via 'L4_Sigma0_GetPage') to a local address that was already populated with another page (previously mapped from Sigma0). Apparently, the kernel removes the old mapping but does not install the new one, with no indication of an error. I tracked the problem to one of the conditions in 'map_fpage'. Admittedly, I am not proficient with this part of the kernel but I changed the condition to consider mappings from sigma0 as a special case. For such mappings, the check of the mapping source should be true by definition because it refers to the physical address space. The patch solved the overmap problem for me. Maybe you could review it and include it in Pistachio? Cheers Norman -- Norman Feske Genode Labs http://www.genode-labs.com ยท http://genode.org
roottask_overmap.patch
(text/x-patch, 566 B)
diff -r 57124b75c67c kernel/src/generic/linear_ptab_walker.cc
--- a/kernel/src/generic/linear_ptab_walker.cc Thu Jul 15 09:38:50 2010 +0200
+++ b/kernel/src/generic/linear_ptab_walker.cc Wed Aug 04 10:22:52 2010 +0200
@@ -530,7 +530,7 @@
* We might have invalidated the source mapping during the
* unmap operation above. If so, we have to skip it.
*/
- if (! fpg->is_valid (this, f_size))
+ if ((! fpg->is_valid (this, f_size)) && !is_sigma0_space(this)) {
goto Next_receiver_entry;
}
else if (tpg->is_valid (t_space, t_size) &&