Skip to content

virtio-rtc: advertise smeared UTC clock type - #5191

Open
Daniel Urbonas (d-urbonas) wants to merge 5 commits into
microsoft:mainfrom
d-urbonas:durbonas/virtio-rtc-smeared
Open

Daniel Urbonas (d-urbonas) wants to merge 5 commits into
microsoft:mainfrom
d-urbonas:durbonas/virtio-rtc-smeared

Conversation

@d-urbonas

Copy link
Copy Markdown
Contributor

The Linux virtio_rtc driver only registers an RTC class device when the clock type is VIRTIO_RTC_CLOCK_UTC_SMEARED. As of October, there are no more leap seconds, so we can advertise our clock in this way such that the guest can expose the device.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the virtio-rtc clock-advertisement update.

No open issues 🎉

What changed in this PR

This PR changes OpenVMM’s virtio-rtc clock advertisement to UTC_SMEARED, allowing Linux’s virtio RTC driver to register an RTC-class device while retaining host wall time as the clock source.

Changes:

  • Replace UTC_MAYBE_SMEARED with UTC_SMEARED in the protocol constant and capability response.
  • Update the capability test to expect the new clock type.
  • Align Guide documentation and describe Linux RTC registration and boot-time clock initialization.
File Description
vm/​devices/​virtio/​virtio_rtc/​src/​tests.rs Update the expected clock capability.
vm/​devices/​virtio/​virtio_rtc/​src/​spec.rs Define CLOCK_UTC_SMEARED with protocol value 3.
vm/​devices/​virtio/​virtio_rtc/​src/​lib.rs Advertise the smeared UTC clock type.
Guide/​src/​reference/​openvmm/​management/​cli.md Update the CLI reference’s clock description.
Guide/​src/​reference/​devices/​virtio/​rtc.md Clarify clock behavior and Linux RTC/PTP configuration.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 22:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the virtio RTC clock-type update and accompanying documentation changes.

No open issues 🎉

Review effort: Balanced

@weltling Anatol Belski (weltling) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

Copilot AI balanced review requested due to automatic review settings November 23, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the virtio-rtc clock advertisement and documentation changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 25, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the Virtio RTC clock-type update supporting Linux RTC-class registration.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants