Add TLS support to SVA. TLS segmentation is managed in SVA.#35
Open
tupipa wants to merge 1 commit intojtcriswell:masterfrom
Open
Add TLS support to SVA. TLS segmentation is managed in SVA.#35tupipa wants to merge 1 commit intojtcriswell:masterfrom
tupipa wants to merge 1 commit intojtcriswell:masterfrom
Conversation
1. added two members 'fsbase', and 'state_flags' in structure sva_integer_state_t 2. updated system call entry: SVAsyscall in handler.S: reset state_flags to 0 before enter syscall; after syscall returns, check state_flags to determine wheter to restore FSBASE MSR 3. updated context switch (sva_swap_integer): set state_flags to 1 for old thread. 4. added a hack function sva_init_fsbase. This is used for Kernel to update 'fsbase' in SVA. This is a hack since 'fsbase' should not be exposed to Kernel. A better solution could be allowing the application to issue a hypercall directly to SVA to initializae 'fsbase'.
Author
|
Tested on Intel Sandy Bridge (Core i5-2410M). -- Note: This arch has no 'rdrand' instruction which is used to generate SVA thread ID. Thus this is replaced by an integer number during testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enable FS/FSBASE and related SVA structure save/restore during system call dispatching (SVAsyscall in handler.S) and context switching (sva_swap_integer). Kernel is also patched (as a hack) for initialization (or reset) of FSBASE.
A clearer patch for kernel can be viewed online: tupipa/sva_freebsd90@a1edb59
Known Issues: