docs(core-concepts): clarify which cu/nvml symbols libvgpu.so intercepts - #754
Conversation
The GPU virtualization page said HAMi-Core hijacks all functions starting with cu and nvml. Interception is actually limited to the symbols listed in the DLSYM_HOOK_FUNC sections of src/libvgpu.c; anything not listed resolves to the real driver, and cuGraph* is skipped outright in find_symbols_in_table(). Updates the component table and the dlsym section, plus the zh translation. Signed-off-by: ipsitapp8 <ipsitapp8@gmail.com>
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe English and Chinese GPU virtualization documentation now states that ChangesGPU virtualization documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ipsitapp8, rootsongjc The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The GPU virtualization page says HAMi-Core hijacks NVIDIA library functions "starting with
cu/nvml", and that it intercepts "all function calls starting withcuandnvml". That is broader than whatlibvgpu.sodoes.dlsymis overridden insrc/libvgpu.c, but what comes back is decided by a lookup, not by the prefix:nvml*goes to__dlsym_hook_section_nvml(), which is an explicit list ofDLSYM_HOOK_FUNC(...)entries. A symbol that is not in the list returns NULL and falls through to the realdlsym.cu*is resolved againstlibvgpu.soitself first. If HAMi-Core defines no wrapper for it, it falls through the same way. ThecuGetProcAddresspath goes through__dlsym_hook_section(), which is the same kind of list.One family is skipped outright, in
find_symbols_in_table()insrc/cuda/hook.c:This matters when the page is used to debug an isolation gap. "Every
cu/nvmlcall is intercepted" and "the calls in the hook table are intercepted" point at different causes for an allocation that got past the limit.The change touches the
HAMi-Corerow in the component table and thedlsymparagraph in the interception flow section, in English and Chinese. Text only, no links or page structure changed.AI assistance: I used Claude Code to check the existing wording against the HAMi-core source.
Which issue(s) this PR fixes:
None. 4 changed lines, below the 100 line threshold that requires an issue first.
Checklist:
npm run lintandnpm run format:checkpassnpm run buildsucceeds for bothenandzhgit commit -s)Note on the first box: markdownlint is clean across the repo and Prettier is clean on both changed files. Running
npm run format:checkon a Windows checkout reports every file in the repo, including untouched ones on master, becausecore.autocrlfgives CRLF line endings locally. That is a local artifact, not something in this diff.Summary by CodeRabbit