From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, mst@redhat.com, anisinha@redhat.com,
pbonzini@redhat.com, shannon.zhaosl@gmail.com, philmd@linaro.org,
zhao1.liu@intel.com, rad@semihalf.com,
leif.lindholm@oss.qualcomm.com,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 08/11] arm: virt: create GWDT watchdog paired with WDAT ACPI table
Date: Mon, 23 Feb 2026 10:28:40 +0100 [thread overview]
Message-ID: <20260223102840.45ddd17e@imammedo> (raw)
In-Reply-To: <CAFEAcA_v4Y5NEiYZsTyQPt=orc8gxGJ_PWu55T_0mAt+iY4OQA@mail.gmail.com>
On Thu, 19 Feb 2026 16:04:37 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:
> On Thu, 19 Feb 2026 at 14:55, Igor Mammedov <imammedo@redhat.com> wrote:
> >
> > On Thu, 19 Feb 2026 13:00:13 +0000
> > Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > > On Thu, 19 Feb 2026 at 12:17, Igor Mammedov <imammedo@redhat.com> wrote:
> > > >
> > > > On Wed, 18 Feb 2026 19:08:36 +0000
> > > > Peter Maydell <peter.maydell@linaro.org> wrote:
> > >
> > > > > Please can you also add support for exposing this device
> > > > > in the device tree ?
> > > >
> > > > It's possible,
> > > > but we probably should not enable it if acpi variant was requested,
> > > > to avoid confusion on guest side.
> > >
> > > Why? Almost every other device on this board we advertise
> > > via DTB for device tree guests and via ACPI for ACPI guests.
>
> > If we expose both guest may try to load both drivers causing conflict or misbehavior.
>
> Huh? A guest will do one of:
> 1 read the ACPI tables, and load the driver based on the ACPI data
> 2 read the DTB, and load the driver based on the DTB
>
> Nothing tries to read both at once, or it would get totally
> confused.
>
> > I can try and see what arm kernel would do in presence if both
> > but that's not the point.
>
> We know already that this works fine, because almost every
> piece of hardware in the virt board is described in both
> the dtb and the ACPI tables.
>
> > One should consider plain GWDT whatchdog as a different device
> > when compared to WDAT one.
> > The later one is basically an synthetic watchdog with it's own driver.
> > From guest pov they are different devices (using the same registers/irqs).
>
> But there is only one piece of hardware here, right?
To some degree only (GWDT is wired to use different frequency
depending if it's configured for native or WDAT usecase)
> I don't have an opinion on what the best way to tell the
> guest about that in the ACPI tables is. I just want us
> to report the presence of the watchdog in both DTB and ACPI,
> so that it is usable whichever the guest is using.
correct way would be for QEMU to ship following:
1. DTB + watchdog descriptor in GTDT ACPI table for native watchdog
for that one, GWDT is wired at 1GHz resolution (same as SBSA one)
for current amr/virt machine type
or alternatively
2. WDAT table describing abstract watchdog
for this one GWDT is wired to 1KHz resolution (limitation if MS spec)
watchdog in GTDT is likely to cause conflict with WDAT watchdog timer.
Also given that DTB/GTDT spec doesn't provide explicit timer resolution,
native driver is not going to work correctly with 1Kz gwdt variant,
since it assumes wdt resolution is at 'System Counter clock frequency'
according to linux driver.
On top of current WADT impl, I can add #1 option on respin
if that is what you are asking for
(or just a DTB variant if that is sufficient for acceptance).
> > > > > Can we have a command line option name that isn't ACPI
> > > > > specific, please? There's nothing inherent to ACPI about
> > > > > "I would like a watchdog device".
> > > >
> > > > that is specifically asking for ACPI flavor being used/configured.
> > > > acpi specific option conflates 2 things:
> > > > 1. watchdog device creation (of the board choice) with properties tuned for WDAT usage
> > > > 2. how to expose it on firmware level (in this case ACPI WDAT table)
> > >
> > > Right, and I think that's the wrong way to approach this,
> > > at least for the virt board. We should either always create
> > > or allow the user to ask us to create a watchdog device.
> > > And then we should do what we do for all the other devices,
> > > which is expose it via both the mechanisms that we have
> > > for telling the guest about hardware (ACPI and DTB).
> >
> > Looks like I wasn't clear, WDAT is not a description
> > of the hardware watchdog. It's a 'abstract watchdog device',
> > that uses a set IO/MMIO operations from WDAT table to manage
> > whatever hardware watchdog board provides. Guest uses WDAT
> > specific driver to manage it.
>
> Does the user need to care about how we report the hardware in
> the ACPI tables? Is there not a way we can report it that works
> for all guests?
it's more about letting user to pick what 'hardware' to use,
this is usually done in firmware setup GUI on bare metal.
In this case QEMU is playing the role of firmware knob.
I don't see how it would work for any guest without changing
guest behavior/configuration.
supported cases would be:
q35:
- off: not supported
- native: default
- Linux: present and in use by TCO driver but not running unless guest enables service,
- on Windows, present but not in use)
- wdat:
- Linux: same as 'native' but in use by different driver (wdat_wdt)
- Windows: present/in use by inbox driver, and armed/running by default on OS startup
not manageable by user on guest side.
arm/virt:
- off: default
- native: DTB/GTDT pair exposed
- Linux/Windows: I need to check what both would do with it.
- wdat:
- should be the same as q35 above
So far WDAT the only known way to start watchdog in Windows without having
install native drivers (or in absence of such also write/maintain them),
this series describes watchdog as an abstract one and helps in an effort
to avoid writing/maintaining multitude of drivers Windows drivers and
a means to manage them on guest side. It also lets us to change underlying
hardware transparently without breaking guest if we decide to change
used watchdog hw later on.
That's what VMWare lets users to configure and this series tries to close
this feature gap.
> thanks
> -- PMM
>
next prev parent reply other threads:[~2026-02-23 9:29 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 13:14 [PATCH 00/11] Introduce ACPI watchdog for Q35 and arm/virt boards Igor Mammedov
2026-02-06 13:14 ` [PATCH 01/11] acpi: add API to build WDAT instructions Igor Mammedov
2026-02-16 8:12 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 02/11] machine: add "acpi-watchdog" property Igor Mammedov
2026-02-16 8:23 ` Ani Sinha
2026-02-26 17:08 ` Philippe Mathieu-Daudé
2026-02-27 8:23 ` Igor Mammedov
2026-02-06 13:14 ` [PATCH 03/11] x86: q35: generate WDAT ACPI table Igor Mammedov
2026-02-16 10:51 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 04/11] tests: acpi: x86/q35: whitelist new WDAT table Igor Mammedov
2026-02-16 9:50 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 05/11] tests: acpi: x86/q35: add WDAT table test case Igor Mammedov
2026-02-16 9:51 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 06/11] tests: acpi: x86/q35: update expected WDAT blob Igor Mammedov
2026-02-17 5:34 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 07/11] arm: add tracing events to sbsa_gwdt Igor Mammedov
2026-02-16 10:22 ` Ani Sinha
2026-02-06 13:14 ` [PATCH 08/11] arm: virt: create GWDT watchdog paired with WDAT ACPI table Igor Mammedov
2026-02-18 19:08 ` Peter Maydell
2026-02-19 12:17 ` Igor Mammedov
2026-02-19 13:00 ` Peter Maydell
2026-02-19 14:55 ` Igor Mammedov
2026-02-19 16:04 ` Peter Maydell
2026-02-23 9:28 ` Igor Mammedov [this message]
2026-02-25 15:11 ` Daniel P. Berrangé
2026-02-25 15:19 ` Daniel P. Berrangé
2026-02-26 12:56 ` Igor Mammedov
2026-02-27 7:24 ` Markus Armbruster
2026-02-27 9:01 ` Daniel P. Berrangé
2026-02-27 10:01 ` Igor Mammedov
2026-02-27 10:18 ` Daniel P. Berrangé
2026-02-27 11:41 ` Igor Mammedov
2026-02-27 9:42 ` Igor Mammedov
2026-02-27 12:10 ` Markus Armbruster
2026-02-27 13:14 ` Peter Maydell
2026-02-27 14:51 ` Markus Armbruster
2026-02-27 15:01 ` Peter Maydell
2026-03-02 5:32 ` Markus Armbruster
2026-02-06 13:14 ` [PATCH 09/11] tests: acpi: arm/virt: whitelist new WDAT table Igor Mammedov
2026-02-06 13:14 ` [PATCH 10/11] tests: acpi: arm/virt: add WDAT table test case Igor Mammedov
2026-02-06 13:14 ` [PATCH 11/11] tests: acpi: arm/virt: update expected WDAT blob Igor Mammedov
2026-02-16 7:39 ` [PATCH 00/11] Introduce ACPI watchdog for Q35 and arm/virt boards Ani Sinha
2026-02-16 8:46 ` Mohamed Mediouni
2026-02-18 9:29 ` Igor Mammedov
2026-02-18 19:10 ` Peter Maydell
2026-02-19 12:27 ` Igor Mammedov
2026-02-19 14:05 ` Peter Maydell
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=20260223102840.45ddd17e@imammedo \
--to=imammedo@redhat.com \
--cc=anisinha@redhat.com \
--cc=berrange@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-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.