Enable mapping extra TCB and SC caps into PD's#406
Conversation
8191952 to
6ec5219
Compare
34d549f to
e2661e0
Compare
3938f82 to
36eed41
Compare
Indanz
left a comment
There was a problem hiding this comment.
As you can see from the comments, I don't know Rust, so take everything I say with a big grain of salt. But I'm pretty sure it doesn't need to be quite this ugly.
49c8382 to
c870e06
Compare
|
Remaining work on this to get this merged:
Desired additions in later PRs.
|
|
We've bikeshed the appearance internally, and decided that it will look like: <protection_domain name="alpha">
<cspace> <!-- the root cnode (currently size 512) -->
<!-- implicitly, not mentioned in the xml: the microkit caps -->
<cap_tcb slot="1" pd="beta" />
<cap_vspace slot="2" pd="beta" />
</cspace>
</protection_domain>
The plan is soon to change the layout of this exactly; I'm going to make the layout of where the user caps be instead an implementation details and you should use a helper function. Survey of cap typesWe have:
|
Actually, for timeout fault handlers it makes sense to reply on behalf of the task for recovery purposes, especially if the server is reset. |
well, regardless, the badge means nothing. and this would be associated with a PD, at least. |
|
Commit history before I clean it up: https://github.com/au-ts/microkit/tree/archive/cap_sharing_history. |
758a9ae to
9cd8dd8
Compare
This is useful for the following cap_sharing commit. We have these three mappings from PD index to CSpace/Notification/ Endpoint; if we wanting to track more we'd need even more hashmaps. Instead, merge them into a 'PDShadowCSpace' struct which is easier to add more elements into, and lookup. Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
This adds the ability to map (some) 'extra' capabilities into pre-defined slots in a PD's CSpace, such as the TCB or SC of another PD, which can be useful for writing userspace schedulers without needing to use the parent-child hierarchy. This does increase the size of the PD CNode to 1024 entries. Co-authored-by: Krishnan Winter <krishnan.winter@unsw.edu.au> Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
9cd8dd8 to
e6008be
Compare
Note
See the modifications to manual.md for the behaviour, or alternatively, the old version of the PR description which is roughly similar but differs in the details:
This PR adds functionality to map arbitrary TCB and SC caps of other PD's into another PD. This can allow a user to share a SC cap of one PD to another without having to explicitly make the destination PD the parent (and therefore have to also handle faults of the child).
Adding a cap to a PD requires adding a
<cap/>node to a PD:You must specify the type of cap (currently only implemented for TCBs and SCs but can be extended in the future). Additionally, the name of the pd that is the source of that cap. The destination cspace slot is an index into the
BASE_USER_CAPSregion of the cspace.This PR is also reflected in: https://github.com/au-ts/microkit_sdf_gen/tree/cap_sharing