Skip to content

Commit

Permalink
virtme: make sure RTC is enabled with microvm
Browse files Browse the repository at this point in the history
If RTC is not enabled with the microvm architecture the kernel may end
up wasting time to probe the RTC during boot:

 [    2.477821] rtc_cmos rtc_cmos: broken or not accessible
 [    2.478041] probe of rtc_cmos returned 6 after 1108478 usecs
 [    2.478070] initcall cmos_init+0x0/0x90 returned -19 after 1108517 usecs

Make sure to enable the RTC to avoid this unnecessary failure and speed
up boot time.

A simple `vng -- uname -r` goes from ~3s to ~0.9s with this change
applied using a 6.9 kernel.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
Andrea Righi committed May 17, 2024
1 parent 03daec6 commit 103ee69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtme/architectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def qemuargs(is_native, use_kvm):
ret = Arch.qemuargs(is_native, use_kvm)

# Use microvm architecture for faster boot
ret.extend(["-M", "microvm,accel=kvm,pcie=on"])
ret.extend(["-M", "microvm,accel=kvm,pcie=on,rtc=on"])

if is_native and use_kvm:
# If we're likely to use KVM, request a full-featured CPU.
Expand Down

0 comments on commit 103ee69

Please sign in to comment.