[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Add support for virtual hardware watchdogs
From: |
Richard W.M. Jones |
Subject: |
[Qemu-devel] [PATCH] Add support for virtual hardware watchdogs |
Date: |
Thu, 26 Feb 2009 14:41:07 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
This is full patch for adding support for virtual hardware watchdogs.
The patch implements a -watchdog command line parameter to enable a
watchdog (on pc and isapc targets only).
Two physical devices are emulated:
Intel 6300ESB ("-watchdog i6300esb") - a PCI watchdog device which
has two timers and some mid-range features
iBase 700 ("-watchdog ib700") - a simple, two-register ISA watchdog [1]
No special software is needed inside the guest. Linux comes with
drivers for both devices, and they can be downloaded for Windows. The
userspace watchdog daemon for Linux is in most distributions.
Several actions are available when the watchdog expires, and these can
also be specified on the command line (-watchdog model,action=...):
- action=reset (default) which hard resets the machine, basically
the same as a real hardware watchdog would do
- action=shutdown, which does an ACPI shutdown
- action=poweroff, which hard powers off
- action=pause, which pauses the VM
The code is split into the following files:
- watchdog.{c,h} contains common code for parsing the command line
and performing one of the above actions
- hw/wdt_*.{c,h} are the emulated devices
I've tested the watchdog functionality under Linux (normal & failure
cases), all of the possible actions, and also save and restore of the
VM.
Comments welcome.
Rich.
[1] The reason for implementing the ib700 was because it is so simple
that it's easy to write drivers for different operating systems for
it. The reason for implementing more than one watchdog device at all
is that there is no real standard, nor any "canonical" device. IPMI
is as close as it comes to a standard, and that involves a much larger
implementation of many features unrelated to watchdogs.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 68 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
qemu-watchdog-2.patch
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Add support for virtual hardware watchdogs,
Richard W.M. Jones <=