Conversation
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.
Summary
Rewrite the "PerCPU" chapter (
src/chap04/subchap01/PerCPU.md) to describe hvisor's current per-CPU design. The chapter now covers:PER_CPU_ARRAY_PTR + cpuid * PER_CPU_SIZE, stack above the slot);TPIDR_EL2/IA32_GS_BASE/CSR_SSCRATCH/root CSR SAVE0) with per-arch semantics, behind the uniformset_this_cpu_pointer/this_cpu_pointer accessors;this_cpu_data()/this_cpu_id()) vs remote (get_cpu_data()) access interfaces;MAX_CPU_NUMarrays.Motivation
The previous version of this chapter predates recent per-CPU implementation changes (register-based slot-pointer caching, new struct fields) and no longer matches the code. The rewrite describes the design as it stands so the book remains an accurate reference for developers reading the source.
Verification
mdbookbuild passes with no warnings.Risks and Limitations
src/cpu_data.rsand the per-archcpu.rs; revisit if the per-CPU mechanism changes again.References
Related: hvisor #392.