Hi,
On 5/7/23 10:18, zhanghao1 wrote:
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 <zhangh...@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-zhangh...@kylinos.cn/
hw/virtio/Kconfig | 5 +
hw/virtio/meson.build | 2 +
hw/virtio/trace-events | 6 +
hw/virtio/virtio-vcpu-watchdog-pci.c | 86 +++++++++
hw/virtio/virtio-vcpu-watchdog.c | 226 +++++++++++++++++++++++
include/hw/virtio/virtio-vcpu-watchdog.h | 37 ++++
6 files changed, 362 insertions(+)
create mode 100644 hw/virtio/virtio-vcpu-watchdog-pci.c
create mode 100644 hw/virtio/virtio-vcpu-watchdog.c
create mode 100644 include/hw/virtio/virtio-vcpu-watchdog.h
Applying: virtio: add a new vcpu watchdog
.git/rebase-apply/patch:258: trailing whitespace.
error: patch failed: hw/virtio/meson.build:33
error: hw/virtio/meson.build: patch does not apply
Patch failed at 0001 virtio: add a new vcpu watchdog
On what commit/branch/tree is your patch based?
Thanks,
Phil.