On Thu, Feb 19, 2026 at 04:04:37PM +0000, Peter Maydell wrote:
> On Thu, 19 Feb 2026 at 14:55, Igor Mammedov <[email protected]> wrote:
> >
> > On Thu, 19 Feb 2026 13:00:13 +0000
> > Peter Maydell <[email protected]> wrote:
> >
> > > On Thu, 19 Feb 2026 at 12:17, Igor Mammedov <[email protected]> wrote:
> > > >
> > > > On Wed, 18 Feb 2026 19:08:36 +0000
> > > > Peter Maydell <[email protected]> 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.

The watchdog is different though as the ACPI WDAT table is not
describing the underlying piece of hardware. Instead it is
describing an interface for controlling watchdog functionality,
such that the guest does not have any awareness of what the
underlying physical impl is.

This feels like a pretty awful characteristic of the ACPI WDAT
design, as it forces guests to do hacks like the quirk added to
iTCO :-(

If such hacks aren't possible then it forces the even worse
behaviour of QEMU mgmt apps needing to decide between multiple
different watchdog configs depending on what they know about
guest OS support :-(

Bit of a no-win scenario.

> > 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?

QEMU knows that, but the guest OS does not. It cloud be one piece of
hardware in which case only 1 exposed device can be activated, or it
could be two distinct pieces of hardware both of which can be used
independently.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to