Re: [RFC PATCH v3 10/10] kernel/time: Add /dev/vmclock_host miscdev
From: David Woodhouse
Date: Thu May 28 2026 - 12:45:53 EST
On Thu, 2026-05-21 at 14:29 +0800, Wen Gu wrote:
>
> I think this should be cpu_to_le16(-(s16)tk->tai_offset)?
>
> vmclock_set_tk_reference() in Patch 9 treats clk->tai_offset_sec as
> a (UTC - TAI) offset, so the sign here probably needs to be inverted.
Yes, thank you. Arguably this is a "bug" in the vmclock specification,
which defines it the wrong way round to normal people. But it's baked
into the vmclock guest driver which has been in the kernel for a while
now, so I guess it's too late to fix it, and we just have to document
it clearly.
It's not *wrong* per se; just unconventional.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature