Re: Watchdog Spec Questions


Anup Patel
 

On 15/10/21, 2:34 PM, "tech-unixplatformspec@... on behalf of Andrew Jones" <tech-unixplatformspec@... on behalf of drjones@...> wrote:

On Thu, Oct 14, 2021 at 03:00:30PM -0500, Vedvyas Shanbhogue wrote:
> On 10/14/21 2:47 PM, Greg Favor wrote:
> > On Thu, Oct 14, 2021 at 12:32 PM Vedvyas Shanbhogue <ved@...
> > <mailto:ved@...>> wrote:
> >
> > I am missing why M-mode needs to trap and emulate a virtual watchdog
> > device access from a guest OS. That should be a hypervisor function.
> >
> >
> > I was referring T&E of a host watchdog (from S/HS-mode to M-mode).
> >
> Thanks. Sorry, I missed that your response was orthogonal and was not a
> response to Jonathon's comment that its not a problem for the hypervisor to
> emulate.
>
> I agree with you that I don't see under what circumstance M-mode would want
> to trap and emulate a host watchdog so M-mode complexity to T&E should be
> orthogonal to this topic.
>
>
> > A hypervisor that passes through a virtual watchdog device to its guest
> > has to trap and emulate the virtual watchdog device anyway - including
> > having a virtual watchdog timer that is emulated by the hypervisor.
> >
> >
> > That isn't so clear as being the case in some or all hypervisors (i.e.
> > that the watchdog device will be faithfully emulated). Just like all
> > the power management stuff that a guest OS does is not simply 1-for-1
> > emulated literally by a hypervisor.
> >
> I agree. It's an emulation and is only so good as the code written for
> emulation. Its not a hard device to emulate however considering everything
> else a hypervisor may need to emulate as Jonathon said earlier.

Will the watchdog timer have hardware support for scaling and offsetting
the virtual watchdog timer? Guest timekeeping is quite complex when one
considers a guest may be paused at any time and migrated to other hosts
which have different clock frequencies.

[Anup] Apologies for missing this questions.

[Anup] The watchdog timer does not define any scaling and offsetting
support for virtualization because current expectation is that hypervisors
will emulate Guest/VM watchdog totally in software.

[Anup] As suggested by in this email thread, it's better to expose only
effective watchdog tick frequency via DT/ACPI. This will further simplify
Guest/VM migration because hypervisors can emulate a fixed watchdog
tick frequency on both source and destination hosts irrespective of the
MTIME frequency on these hosts.

Regards,
Anup

Thanks,
drew

>
> regards
> ved
>
>
>
>
>
>

Join {tech-unixplatformspec@lists.riscv.org to automatically receive all group messages.