[RFC] Initial virtualization support #1910
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello.
I want to discus how virtualization support can look in OP-TEE. This patch adds very basic support for it.
With this code I was able to use OP-TEE from two different VMs. Sequentially, of course. Currently, no cross-VM blocking is supported. I'll publish corresponding XEN code, if anyone is interested.
As I said in commit message, I try to move all client-bound global variables to a client context. Default client context will be used if virtualization is disabled. This adds small overhead (one extra
LDR
, for variables access, I think), but it makes code more clean.Currently, only cached RPC commands buffers are stored in client context.
I don't ask you to do thorough code review. I just want to discuss proposed approach. This patch alone can't be used for production. On another hand, if you are okay with it, it can be merged with big warning "DO NOT enable CFG_VIRTULIZATION in production"
The biggest problem I see currently is thread termination if client VM dies in the middle of RPC. I propose to discuss this in #1890