mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
x86: q35: add 'wdat' property
Used for enabling WDAT based watchdog for builtin iTCO watchdog.
Usage:
-M q35,wdat={on|off}
By default it is disabled.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260303092532.2410177-3-imammedo@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
f793df3dca
commit
d30189cce1
@@ -331,6 +331,18 @@ static void pc_q35_init(MachineState *machine)
|
||||
}
|
||||
}
|
||||
|
||||
static bool pc_q35_machine_get_wdat(Object *o, Error **errp)
|
||||
{
|
||||
PCMachineState *pcms = PC_MACHINE(o);
|
||||
return pcms->wdat_enabled;
|
||||
}
|
||||
|
||||
static void pc_q35_machine_set_wdat(Object *o, bool value, Error **errp)
|
||||
{
|
||||
PCMachineState *pcms = PC_MACHINE(o);
|
||||
pcms->wdat_enabled = value;
|
||||
}
|
||||
|
||||
#define DEFINE_Q35_MACHINE(major, minor) \
|
||||
DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, false, NULL, major, minor);
|
||||
|
||||
@@ -343,6 +355,7 @@ static void pc_q35_init(MachineState *machine)
|
||||
static void pc_q35_machine_options(MachineClass *m)
|
||||
{
|
||||
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
ObjectClass *oc = OBJECT_CLASS(m);
|
||||
pcmc->pci_root_uid = 0;
|
||||
pcmc->default_cpu_version = 1;
|
||||
|
||||
@@ -361,6 +374,11 @@ static void pc_q35_machine_options(MachineClass *m)
|
||||
machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
|
||||
machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
|
||||
machine_class_allow_dynamic_sysbus_dev(m, TYPE_UEFI_VARS_X64);
|
||||
object_class_property_add_bool(oc, "wdat",
|
||||
pc_q35_machine_get_wdat, pc_q35_machine_set_wdat);
|
||||
object_class_property_set_description(oc, "wdat",
|
||||
"Enable WDAT watchdog support. Default: off");
|
||||
|
||||
compat_props_add(m->compat_props,
|
||||
pc_q35_compat_defaults, pc_q35_compat_defaults_len);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ typedef struct PCMachineState {
|
||||
const char *south_bridge;
|
||||
|
||||
bool acpi_build_enabled;
|
||||
bool wdat_enabled;
|
||||
bool smbus_enabled;
|
||||
bool sata_enabled;
|
||||
bool hpet_enabled;
|
||||
|
||||
Reference in New Issue
Block a user