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

neonvm: add RTC to arm kernel config #1302

Merged
merged 6 commits into from
Mar 10, 2025
Merged

Conversation

mikhail-sakhnov
Copy link
Contributor

CONFIG_RTC_CLASS to enable RTC subsystem.
CONFIG_RTC_DRV_EFI to use RTC from efi firmware.

With this combination of settings time in guest vm is valid. Otherwise it always starts with 1970- (0 timestamp).

@mikhail-sakhnov mikhail-sakhnov marked this pull request as ready for review March 5, 2025 18:51
@sharnoff
Copy link
Member

sharnoff commented Mar 5, 2025

Hm, any idea why it's needed on arm and not x86?

@mikhail-sakhnov
Copy link
Contributor Author

mikhail-sakhnov commented Mar 6, 2025

Hm, any idea why it's needed on arm and not x86?

There might be almost infinitive amount of reasons and I haven't invest time into that.
x86 might use CMOS time, or x86 might have some legacy code to handle time without external rtc device.

Plus on arm we use uefi on arm, which might give us different behaviour on such a base level.

I think also the comment in the source code https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-cmos.c#L10 might be related, specifically the part about x86 bypassing RTC "x86 has code to bypass the RTC framework, directly reading the RTC during boot"

@Omrigan
Copy link
Contributor

Omrigan commented Mar 6, 2025

See also #712

@mikhail-sakhnov mikhail-sakhnov merged commit f87d2bd into main Mar 10, 2025
33 checks passed
@mikhail-sakhnov mikhail-sakhnov deleted the misha/enable-rtc-in-arm branch March 10, 2025 10:46
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.

3 participants