qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts
Date: Wed, 03 Jun 2015 15:40:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 03/06/2015 15:14, Markus Armbruster wrote:
>>                                    However, boards often have embedded
>> watchdog devices; even if they currently don't, these should call
>> watchdog_perform_action() so that they are affected by -watchdog-action.
>> (This is listed in our BiteSizedTasks wiki page).
> 
> You'd have to configure their watchdog action with -global, because
> that's how we set onboard device properties.

Right.  That however doesn't work if the watchdog is a device but isn't
qdevified, or the watchdog isn't a device and doesn't have a dummy
device wrapper around it, aka the KVM_EXIT_WATCHDOG case.

Also, it's very hard to discover (e.g. how is one supposed to find a
watchdog_action property under ICH9_LPC---not yet upstream, but should
be in 2.4).

>    This makes -watchdog available in configuration files, like this:
> 
>         [watchdog]
>            model = "ib700"
> 
>    "-balloon virtio -watchdog ib700 -writeconfig /dev/stdout" now
>    produces
> 
>         [device]
>           driver = "virtio-balloon"
> 
>         [watchdog]
>           model = "ib700"
> 
>    Digs us deeper into the "alternative syntax" hole.

True, but consistent with "-drive if=virtio" which doesn't produce a
[device] stanza.

>    Of the three -watchdog behaviors "reject more than one watchdog",
>    "just add them all whether it makes sense or not" and "add at most
>    one, silently ignore the rest", this gives us the worst.

True, but consistent with the handling of other merge_lists options: the
last wins.

> If the stated objective is all you want, why not convert
> -watchdog-action instead of -watchdog?  Should be simpler.  Just make
> sure to preserve "last option wins" behavior.

Because I'm not sure that we won't have other watchdog options in the
future.  Also,

        [watchdog]
            action = "reset"

is marginally nicer than any of

        [watchdog-action]
            action = "reset"

and

        [machine]
            watchdog-action = "reset"

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]