From: "Alex Bennée" <alex.bennee@linaro.org>
To: zhanghao1 <zhanghao1@kylinos.cn>
Cc: pbonzini@redhat.com, berrange@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] virtio: add a new vcpu watchdog
Date: Wed, 05 Jul 2023 14:42:04 +0100 [thread overview]
Message-ID: <87fs62fp7f.fsf@linaro.org> (raw)
In-Reply-To: <20230705081813.411526-1-zhanghao1@kylinos.cn>
zhanghao1 <zhanghao1@kylinos.cn> writes:
> Each vcpu creates a corresponding timer task. The watchdog
> is driven by a timer according to a certain period. Each time
> the timer expires, the counter is decremented. When the counter
> is "0", the watchdog considers the vcpu to be stalling and resets
> the VM. To avoid watchdog expiration, the guest kernel driver
> needs to periodically send a pet event to update the counter.
>
> Signed-off-by: zhanghao1 <zhanghao1@kylinos.cn>
> ---
> v2:
> - change the function name and remove the redundant word 'stall'
> - add trace-events to replace DPRINTF and qemu_log
> - call 'watchdog_perform_action()' to reset vm
> - update g_new0 to replace malloc
> - update only use '.generic_name'
> - update the bool variable 'is_initialized' to uint32_t
>
> v1: https://lore.kernel.org/qemu-devel/20230615061302.301754-1-zhanghao1@kylinos.cn/
<snip>
> +static void virtio_vcpu_watchdog_device_realize(DeviceState *dev, Error **errp)
> +{
> + VirtIODevice *vdev = VIRTIO_DEVICE(dev);
> + vwdt = VIRTIO_VCPU_WATCHDOG(dev);
> +
> + virtio_init(vdev, VIRTIO_ID_WATCHDOG, 0);
This will never compile because VIRTIO_ID_WATCHDOG isn't defined
anywhere.
Next time you post you need to also include a link to the kernel side of
the driver and the virtio specification (or inflight patch for it).
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-07-05 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 8:18 [PATCH v2] virtio: add a new vcpu watchdog zhanghao1
2023-07-05 11:48 ` Philippe Mathieu-Daudé
2023-07-05 13:42 ` Alex Bennée [this message]
2023-07-05 16:35 ` Trilok Soni
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=87fs62fp7f.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhanghao1@kylinos.cn \
/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.