Skip to content

feat: update vDSO data structures#3

Merged
muou000 merged 2 commits intoStarry-OS:mainfrom
muou000:feat/update-vdso
Dec 10, 2025
Merged

feat: update vDSO data structures#3
muou000 merged 2 commits intoStarry-OS:mainfrom
muou000:feat/update-vdso

Conversation

@muou000
Copy link
Copy Markdown
Collaborator

@muou000 muou000 commented Dec 10, 2025

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_data module with shared VdsoClock and VdsoTimeData structures
  • Refactors architecture-specific VdsoData implementations to use the common VdsoTimeData struct
  • 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,
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
@muou000 muou000 merged commit c2951aa into Starry-OS:main Dec 10, 2025
1 check passed
@muou000 muou000 deleted the feat/update-vdso branch December 10, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants