From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com,
peter.maydell@linaro.org, shannon.zhaosl@gmail.com,
philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com,
leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org
Subject: Re: [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards
Date: Tue, 28 Apr 2026 16:12:15 +0200 [thread overview]
Message-ID: <20260428161215.49cc1c0f@imammedo> (raw)
In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com>
On Tue, 3 Mar 2026 10:25:11 +0100
Igor Mammedov <imammedo@redhat.com> wrote:
> Changelog:
> v2:
> * ditch generic '-machine acpi-watchdog' option in favor of
> board specific variants:
> x86/q35: -machine wdat={on|off}
> arm/virt: -device sbsa_gwdt,wdat={on|off}
> * arm/virt: add FDT and GTDT ACPI entries for GWDT when it's present
> and hide GDTD one when WDAT is enabled.
> * arm/virt: add test case for GTDT
> * [18-21] optional GWDT cleanup/fixes in handling WCV register update,
> make QEMU behave according to spec (at least the way I read it and
> it appears MS also read it that way). It fixes Windows 11 reboots when
> GWDT is present (without WDAT). With that fixed it's up to MS to fix
> their driver to set sane timeout as with the current one wdatchdog
> will never trigger.
given merge window should be open by now,
gentle ping
> Windows doesn't ship built-in TCO watchdog driver, and users are
> forced to install vendor specific driver(s) if such exists.
> However the OS provides a generic watchdog driver that uses
> ACPI WDAT table [1] to abstract actual hardware behind it.
> The same applies to ARM version of Windows.
>
> This series adds
> * WDAT table tailored for TCO watchdog that Q35 already
> has as part of ICH9 chipset and a knob to enable it.
> * SBSA GWDT to arm/virt machine with WDAT table tailored
> for it and necessary tweaks to GWDT to make usable
> with WDAT driver.
> * in addition to WDAT, it also adds native variant
> with GWDT described in FDT and DTDT
> (broken on Windows/works on linux).
>
> Guest OS WDAT support is present since Windows Vista and Linux since 2016[2].
>
> One can test it launching VM with following options:
> * x86:
> -machine q35,wdat=on
> * arm/virt:
> -device sbsa_gwdt,wdat=on
>
> to trace access to TCO registers one can add to CLI:
> -trace "tco_*"
> to trace access to GWDT registers one can add to CLI:
> -trace "sbsa_gwdt*"
>
> To verify that guest uses WDAT (both Windows and Linux would use it if present),
> * on linux make sure that watchdog service is configured/enabled
> (use wdctl to check what watchdog device is in use) and then
> trigger kernel panic with command:
> echo c > /proc/sysrq-trigger
> * on Windows kill svchost process, running cmd in admin mode:
> taskkill /f /im svchost.exe
>
> Tested with WS2025 & RHEL9.6 & Fedora 43 (aarch64)
>
> git tree at: https://gitlab.com/imammedo/qemu/-/commits/gwdt_v2
>
> 1) http://msdn.microsoft.com/en-us/windows/hardware/gg463320.aspx
> 2) https://lwn.net/Articles/700524/
>
> PS:
> previous revision:
> https://patchew.org/QEMU/20260206131438.1857182-1-imammedo@redhat.com/
>
> Igor Mammedov (21):
> acpi: add API to build WDAT instructions
> x86: q35: add 'wdat' property
> x86: q35: generate WDAT ACPI table
> tests: acpi: x86/q35: whitelist new WDAT table
> tests: acpi: x86/q35: add WDAT table test case
> tests: acpi: x86/q35: update expected WDAT blob
> arm: sbsa_gwdt: fixup default "clock-frequency"
> arm: add tracing events to sbsa_gwdt
> arm: virt: create sbsa_gwdt watchdog
> arm: sbsa_gwdt: add 'wdat' option
> arm: virt: add support for WDAT based watchdog
> tests: acpi: arm/virt: whitelist new WDAT table
> tests: acpi: arm/virt: add WDAT table test case
> tests: acpi: arm/virt: update expected WDAT blob
> tests: acpi: arm/virt: whitelist GTDT table
> tests: acpi: arm/virt: add GTDT watchdog table test case
> tests: acpi: arm/virt: update expected GTDT blob
> sbsa_gwdt: reduce code ident
> sbsa_gwdt: move all foo_REFRESH logic under REFRESH condition
> sbsa_gwdt: reschedule timer on direct WCV load
> sbsa_gwdt: limit compare_value to INT64_MAX
>
> include/hw/acpi/wdat-gwdt.h | 19 ++++
> include/hw/acpi/wdat-ich9.h | 15 ++++
> include/hw/acpi/wdat.h | 118 +++++++++++++++++++++++++
> include/hw/i386/pc.h | 1 +
> include/hw/watchdog/sbsa_gwdt.h | 1 +
> hw/acpi/aml-build.c | 14 +++
> hw/acpi/meson.build | 5 +-
> hw/acpi/wdat-gwdt-stub.c | 16 ++++
> hw/acpi/wdat-gwdt.c | 92 +++++++++++++++++++
> hw/acpi/wdat-ich9-stub.c | 15 ++++
> hw/acpi/wdat-ich9.c | 90 +++++++++++++++++++
> hw/arm/Kconfig | 1 +
> hw/arm/virt-acpi-build.c | 65 +++++++++++++-
> hw/arm/virt.c | 2 +
> hw/core/sysbus-fdt.c | 32 +++++++
> hw/i386/acpi-build.c | 12 +++
> hw/i386/pc_q35.c | 18 ++++
> hw/watchdog/sbsa_gwdt.c | 65 +++++++++-----
> hw/watchdog/trace-events | 9 ++
> tests/data/acpi/aarch64/virt/GTDT.gwdt | Bin 0 -> 132 bytes
> tests/data/acpi/aarch64/virt/WDAT.wdat | Bin 0 -> 260 bytes
> tests/data/acpi/x86/q35/WDAT.wdat | Bin 0 -> 308 bytes
> tests/qtest/bios-tables-test.c | 54 +++++++++++
> 23 files changed, 618 insertions(+), 26 deletions(-)
> create mode 100644 include/hw/acpi/wdat-gwdt.h
> create mode 100644 include/hw/acpi/wdat-ich9.h
> create mode 100644 include/hw/acpi/wdat.h
> create mode 100644 hw/acpi/wdat-gwdt-stub.c
> create mode 100644 hw/acpi/wdat-gwdt.c
> create mode 100644 hw/acpi/wdat-ich9-stub.c
> create mode 100644 hw/acpi/wdat-ich9.c
> create mode 100644 tests/data/acpi/aarch64/virt/GTDT.gwdt
> create mode 100644 tests/data/acpi/aarch64/virt/WDAT.wdat
> create mode 100644 tests/data/acpi/x86/q35/WDAT.wdat
>
next prev parent reply other threads:[~2026-04-28 14:14 UTC|newest]
Thread overview: 33+ 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
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 ` Igor Mammedov [this message]
2026-05-12 13:30 ` [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards 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=20260428161215.49cc1c0f@imammedo \
--to=imammedo@redhat.com \
--cc=anisinha@redhat.com \
--cc=leif.lindholm@oss.qualcomm.com \
--cc=mst@redhat.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