From: "Michael S. Tsirkin" <mst@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
qemu-devel@nongnu.org, anisinha@redhat.com, pbonzini@redhat.com,
peter.maydell@linaro.org, shannon.zhaosl@gmail.com,
philmd@linaro.org, rad@semihalf.com,
leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org
Subject: Re: [PATCH v2 03/21] x86: q35: generate WDAT ACPI table
Date: Wed, 13 May 2026 11:28:01 -0400 [thread overview]
Message-ID: <20260513112745-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <agSdBwKQh3C9UgdF@intel.com>
On Wed, May 13, 2026 at 11:47:19PM +0800, Zhao Liu wrote:
> On Tue, Mar 03, 2026 at 10:25:14AM +0100, Igor Mammedov wrote:
> > Date: Tue, 3 Mar 2026 10:25:14 +0100
> > From: Igor Mammedov <imammedo@redhat.com>
> > Subject: [PATCH v2 03/21] x86: q35: generate WDAT ACPI table
> >
> > It will generate WDAT table [1] customized for TCO watchdog.
> > This allows Windows guests (Windows Server 2008/Vista+) to
> > use TCO watchdog using built-in generic driver, which
> > alleviates need to install vendor specific drivers.
> >
> > Given that enabling it might change guest behaviour
> > (both Windows/Linux) the feature is disabled by default.
> >
> > Users that need it can enable the feature with
> > following CLI option.
> > -machine wdat=on
> >
> > 1)
> > "Hardware Watchdog Timers Design Specification"
> > https://uefi.org/acpi 'Watchdog Action Table (WDAT)'
> >
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > Reviewed-by: Ani Sinha <anisinha@redhat.com>
> > ---
> > include/hw/acpi/wdat-ich9.h | 15 +++++++
> > hw/acpi/meson.build | 3 +-
> > hw/acpi/wdat-ich9-stub.c | 15 +++++++
> > hw/acpi/wdat-ich9.c | 90 +++++++++++++++++++++++++++++++++++++
> > hw/i386/acpi-build.c | 12 +++++
> > 5 files changed, 134 insertions(+), 1 deletion(-)
> > create mode 100644 include/hw/acpi/wdat-ich9.h
> > create mode 100644 hw/acpi/wdat-ich9-stub.c
> > create mode 100644 hw/acpi/wdat-ich9.c
>
> ...
>
> > +void build_ich9_wdat(GArray *table_data, BIOSLinker *linker, const char *oem_id,
> > + const char *oem_table_id, uint64_t tco_base)
> > +{
> > + AcpiTable table = { .sig = "WDAT", .rev = 1, .oem_id = oem_id,
> > + .oem_table_id = oem_table_id };
> > + struct AcpiGenericAddress tco_rld = TCO_REG(tco_base, 0x0, 16);
> > + struct AcpiGenericAddress tco2_sts = TCO_REG(tco_base, 0x6, 16);
> > + struct AcpiGenericAddress tco1_cnt = TCO_REG(tco_base, 0x8, 16);
> > + struct AcpiGenericAddress tco_tmr = TCO_REG(tco_base, 0x12, 16);
> > +
> > + acpi_table_begin(&table, table_data);
> > + build_append_int_noprefix(table_data, 0x20, 4); /* Watchdog Header Length */
> > + build_append_int_noprefix(table_data, 0xff, 2); /* PCI Segment */
> > + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Bus Number */
> > + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Device Number */
> > + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Function Number */
> > + build_append_int_noprefix(table_data, 0, 3); /* Reserved */
> > + /*
> > + * limits/resolution are defined by ICH9 TCO spec
> > + */
> > + build_append_int_noprefix(table_data, 0x258, 4);/* Timer Period, ms */
> > + build_append_int_noprefix(table_data, 0x3ff, 4);/* Maximum Count */
> > + build_append_int_noprefix(table_data, 0x4, 4); /* Minimum Count */
>
> Spec said: The time-out period before the WDT fires is recommended to be at
> least 5 minutes and is required to be less than 4,294,967,296 count
> intervals.
>
> Here we encode 0x4 * 0x258 = 2400ms, less than 5 minutes. But I
> understand because "5 minutes" is just "recommanded" by spec, so 2400ms is
> okay.
>
> LGTM,
>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
maybe a comment why it's shorter?
next prev parent reply other threads:[~2026-05-13 15:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 9:25 [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 01/21] acpi: add API to build WDAT instructions Igor Mammedov
2026-05-13 15:23 ` Zhao Liu
2026-03-03 9:25 ` [PATCH v2 02/21] x86: q35: add 'wdat' property Igor Mammedov
2026-05-13 14:58 ` Zhao Liu
2026-05-14 7:16 ` Ani Sinha
2026-03-03 9:25 ` [PATCH v2 03/21] x86: q35: generate WDAT ACPI table Igor Mammedov
2026-05-13 15:47 ` Zhao Liu
2026-05-13 15:28 ` Michael S. Tsirkin [this message]
2026-05-14 14:32 ` Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 04/21] tests: acpi: x86/q35: whitelist new WDAT table Igor Mammedov
2026-05-13 15:48 ` Zhao Liu
2026-03-03 9:25 ` [PATCH v2 05/21] tests: acpi: x86/q35: add WDAT table test case Igor Mammedov
2026-05-13 15:49 ` Zhao Liu
2026-03-03 9:25 ` [PATCH v2 06/21] tests: acpi: x86/q35: update expected WDAT blob Igor Mammedov
2026-05-13 15:48 ` Zhao Liu
2026-03-03 9:25 ` [PATCH v2 07/21] arm: sbsa_gwdt: fixup default "clock-frequency" Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 08/21] arm: add tracing events to sbsa_gwdt Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 09/21] arm: virt: create sbsa_gwdt watchdog Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 10/21] arm: sbsa_gwdt: add 'wdat' option Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 11/21] arm: virt: add support for WDAT based watchdog Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 12/21] tests: acpi: arm/virt: whitelist new WDAT table Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 13/21] tests: acpi: arm/virt: add WDAT table test case Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 14/21] tests: acpi: arm/virt: update expected WDAT blob Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 15/21] tests: acpi: arm/virt: whitelist GTDT table Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 16/21] tests: acpi: arm/virt: add GTDT watchdog table test case Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 17/21] tests: acpi: arm/virt: update expected GTDT blob Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 18/21] sbsa_gwdt: reduce code ident Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 19/21] sbsa_gwdt: move all foo_REFRESH logic under REFRESH condition Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 20/21] sbsa_gwdt: reschedule timer on direct WCV load Igor Mammedov
2026-03-03 9:25 ` [PATCH v2 21/21] sbsa_gwdt: limit compare_value to INT64_MAX Igor Mammedov
2026-04-28 14:12 ` [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards Igor Mammedov
2026-05-12 13:30 ` Igor Mammedov
2026-05-12 14:45 ` Ani Sinha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260513112745-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=anisinha@redhat.com \
--cc=imammedo@redhat.com \
--cc=leif.lindholm@oss.qualcomm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rad@semihalf.com \
--cc=shannon.zhaosl@gmail.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox