replay: character devices

Enterprise / Virtualization / QEMU - Pavel Dovgalyuk [ispras.ru] - 15 March 2016 12:23 UTC

This patch implements record and replay of character devices. It records chardevs communication in replay mode. Recorded information include data read from backend and counter of bytes written from frontend to backend to preserve frontend internal state. If character device was configured through the command line in record mode, then in replay mode it should be also added to command line. Backend of the character device could be changed in replay mode. Replaying of devices that perform ioctl and get_msgfd operations is not supported. gdbstub which also acts as a backend is not recorded to allow controlling the replaying through gdb. Monitor backends are also not recorded.

33577b4 replay: character devices
gdbstub.c | 2 +-
include/sysemu/char.h | 26 +++++++
include/sysemu/replay.h | 17 +++++
qemu-char.c | 138 ++++++++++++++++++++++++++++++-------
replay/Makefile.objs | 1 +
replay/replay-char.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++
replay/replay-events.c | 17 ++++-
replay/replay-internal.h | 18 +++++
replay/replay.c | 2 +-
stubs/replay.c | 34 ++++++++++
10 files changed, 393 insertions(+), 30 deletions(-)

Upstream: git.qemu.org


  • Share