Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TSC frequency. #871

Merged
merged 3 commits into from
Jan 28, 2025
Merged

Fix TSC frequency. #871

merged 3 commits into from
Jan 28, 2025

Conversation

jounathaen
Copy link
Member

Unfortunately, fixing this requires a complete refactoring of the current code, as we need present vcpus to query KVM for the correct TSC frequency.

Fixes #862

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 83.58209% with 55 lines in your changes missing coverage. Please review.

Project coverage is 70.41%. Comparing base (2158f07) to head (99c5816).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/linux/x86_64/kvm_cpu.rs 53.22% 29 Missing ⚠️
src/vm.rs 88.98% 25 Missing ⚠️
src/linux/mod.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
+ Coverage   69.67%   70.41%   +0.74%     
==========================================
  Files          24       24              
  Lines        3096     2947     -149     
==========================================
- Hits         2157     2075      -82     
+ Misses        939      872      -67     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jounathaen jounathaen force-pushed the tsc_freq branch 3 times, most recently from 0aed240 to 64ecc80 Compare January 28, 2025 14:53
@jounathaen jounathaen marked this pull request as ready for review January 28, 2025 14:55
@jounathaen jounathaen force-pushed the tsc_freq branch 4 times, most recently from 847591c to 9cf2b5e Compare January 28, 2025 17:39
peripherals in special struct.

This is a preparation for better frequency detection, as we need the
vcpus to be existing before the memory initialization to query the TSC
frequency from KVM.

Fixes #802
- Removed frequency detection functions
- use KVM capabilities on Linux for freq detection.
- Moved CPU frequency detection into VirtualCPU
@jounathaen jounathaen enabled auto-merge January 28, 2025 17:45
@jounathaen jounathaen added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit 884c76f Jan 28, 2025
11 checks passed
@jounathaen jounathaen deleted the tsc_freq branch January 28, 2025 17:48
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.

Uhyve does not measure the time correctly
1 participant