tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: (tiny) patch review: return if RTC diag fails
On Thu, Feb 13, 2025 at 10:52:30PM +0100, Manuel Bouyer wrote:
> In the case of the VM the problem is not that it's bad, but that it's not
> present (and, I guess, there is another RTC provised by the hypervisor in
> this case). but AFAIK we don't have a way to know if the RTC is
> present or not.
>
> Maybe a solution would be to not call startrtclock() at all in the VM
> case. It's called from cpu_configure() and we're already checking
> for VM_GUEST_XENPVH here.
The hypervisor is a platform like any other, and we ought to be able
to either probe the hardware or know what's there. Filling up driver
code with "if (vm)" is not much better than filling it up with tests
for specific motherboard models -- it might in some cases be the only
alternative but it should be the last choice.
(also it should be specific to the broken hypervisor concerned and not
applied to all hypervisors)
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index