libkrunfw: Add virtio-rtc driver support#121
Merged
slp merged 2 commits intocontainers:mainfrom May 5, 2026
Merged
Conversation
added 2 commits
April 29, 2026 12:39
Backport virtio-rtc driver from upstream Linux kernel to enable RTC and PTP clock support in libkrun guests. Added 4 upstreamed patches on virtio_rtc Enabled virtio_rtc kernel configs This allows libkrun guests to: - Access host time via /dev/rtc* (RTC class driver) - Access PTP clocks via /dev/ptp* (for time synchronization) - Set alarms to wake from suspend - Use cross-timestamping on ARM platforms The driver has been tested with rust-vmm vhost-device-rtc backend. Upstream commits: - 0623c759276885c3ae88197ba6fb5c9c6ba8612f - 9a17125a18f9ae1e1233a8e2d919059445b9d6fd - e2ef16757bbe1d4566093179944e9ebe730b2701 - 9d4f22fd563e0cd02e8448e84d057e7c0132a586 Upstream patch author: Peter Hilber <quic_philber@quicinc.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Add compatibility patch to backport virtio-rtc driver to kernel 6.12. Fix API differences: - Replace secs_to_jiffies(60) with msecs_to_jiffies(60 * 1000) (secs_to_jiffies was introduced after 6.12) - Replace devm_device_init_wakeup(dev) with device_init_wakeup(dev, true) (devm_device_init_wakeup was introduced after 6.12) Both changes provide equivalent functionality and allow the driver to build cleanly on kernel 6.12.76. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport virtio-rtc driver from upstream Linux kernel
to enable RTC and PTP clock support in libkrun guests.
Added 4 upstreamed patches on virtio_rtc
Enabled virtio_rtc kernel configs
This allows libkrun guests to:
The driver has been tested with rust-vmm vhost-device-rtc backend.
Upstream commits:
Upstream patch author: Peter Hilber quic_philber@quicinc.com