feat: update vDSO data structures#3
feat: update vDSO data structures#3muou000 merged 2 commits intoStarry-OS:mainfrom muou000:feat/update-vdso
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the vDSO (Virtual Dynamic Shared Object) data structures to use a unified VdsoTimeData module across all supported architectures. The main changes consolidate previously duplicated clock update logic into a shared implementation while updating the vDSO binary files for x86_64, RISC-V, LoongArch64, and AArch64 architectures.
Key changes:
- Introduces a new
vdso_time_datamodule with sharedVdsoClockandVdsoTimeDatastructures - Refactors architecture-specific
VdsoDataimplementations to use the commonVdsoTimeDatastruct - Updates VVAR_PAGES configuration for all architectures to accommodate new data layout
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vdso/vdso_x86_64.so | Updated x86_64 vDSO binary to match new data structures |
| vdso/vdso_riscv64.so | Updated RISC-V 64-bit vDSO binary to match new data structures |
| vdso/vdso_loongarch64.so | Updated LoongArch64 vDSO binary to match new data structures |
| vdso/vdso_aarch64.so | Updated AArch64 vDSO binary to match new data structures |
| src/vdso_time_data.rs | New module containing shared VdsoClock and VdsoTimeData structures with common update logic |
| src/x86_64/vdso_data.rs | Simplified to wrap VdsoTimeData, delegating update logic to shared implementation |
| src/x86_64/config.rs | Increased VVAR_PAGES from 4 to 6 to accommodate new data layout |
| src/riscv64/vdso_data.rs | Simplified to wrap VdsoTimeData, delegating update logic to shared implementation |
| src/riscv64/config.rs | Increased VVAR_PAGES from 2 to 4 to accommodate new data layout |
| src/loongarch64/vdso_data.rs | Simplified to wrap VdsoTimeData, delegating update logic to shared implementation |
| src/loongarch64/config.rs | Decreased VVAR_PAGES from 44 to 20 and removed architecture-specific cfg attribute |
| src/aarch64/vdso_data.rs | Refactored to use VdsoTimeData and added placeholder buffers for timen, rng, and arch data |
| src/aarch64/config.rs | Decreased VVAR_PAGES from 5 to 4 to match new layout |
| src/update.rs | Moved VdsoClock definition to vdso_time_data module and renamed basetime field to time_data |
| src/vdso.rs | Renamed update() calls to time_update() and added AArch64-specific CNTVCT access enablement |
| src/lib.rs | Added vdso_time_data module declaration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pub tz_minuteswest: i32, | ||
| pub tz_dsttime: i32, | ||
| pub hrtimer_res: u32, | ||
| pub __unused: u32, |
There was a problem hiding this comment.
Inconsistent naming convention: This struct uses __unused (double underscore prefix) while VdsoClock uses _unused (single underscore prefix). For consistency, both should follow the same naming convention (preferably single underscore as it's more idiomatic in Rust).
No description provided.