mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
ppc/spapr: Implement H_WATCHDOG
The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=303120 This was tested by running QEMU with a debug kernel and command line: -append \ "pseries-wdt.timeout=60 pseries-wdt.nowayout=1 pseries-wdt.action=2" and running "echo V > /dev/watchdog0" inside the VM. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220622051008.1067464-1-aik@ozlabs.ru> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
95444afcab
commit
81b205cecf
5 changed files with 310 additions and 1 deletions
|
@ -898,6 +898,8 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt)
|
|||
add_str(hypertas, "hcall-hpt-resize");
|
||||
}
|
||||
|
||||
add_str(hypertas, "hcall-watchdog");
|
||||
|
||||
_FDT(fdt_setprop(fdt, rtas, "ibm,hypertas-functions",
|
||||
hypertas->str, hypertas->len));
|
||||
g_string_free(hypertas, TRUE);
|
||||
|
@ -3051,6 +3053,8 @@ static void spapr_machine_init(MachineState *machine)
|
|||
spapr->vof->fw_size = fw_size; /* for claim() on itself */
|
||||
spapr_register_hypercall(KVMPPC_H_VOF_CLIENT, spapr_h_vof_client);
|
||||
}
|
||||
|
||||
spapr_watchdog_init(spapr);
|
||||
}
|
||||
|
||||
#define DEFAULT_KVM_TYPE "auto"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue