backends: Introduce chr-testdev
From: Paolo Bonzini <pbonzini@redhat.com> chr-testdev enables a virtio serial channel to be used for guest initiated qemu exits. hw/misc/debugexit already enables guest initiated qemu exits, but only for PC targets. chr-testdev supports any virtio-capable target. kvm-unit-tests/arm is already making use of this backend. Currently there is a single command implemented, "q". It takes a (prefix) argument for the exit code, thus an exit is implemented by writing, e.g. "1q", to the virtio-serial port. It can be used as: $QEMU ... \ -device virtio-serial-device \ -device virtserialport,chardev=ctd -chardev testdev,id=ctd or, use: $QEMU ... \ -device virtio-serial-device \ -device virtconsole,chardev=ctd -chardev testdev,id=ctd to bind it to virtio-serial port0. Signed-off-by:Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- backends/Makefile.objs 1 addition, 1 deletionbackends/Makefile.objs
- backends/testdev.c 131 additions, 0 deletionsbackends/testdev.c
- include/sysemu/char.h 3 additions, 0 deletionsinclude/sysemu/char.h
- qapi-schema.json 2 additions, 1 deletionqapi-schema.json
- qemu-char.c 4 additions, 0 deletionsqemu-char.c
- stubs/Makefile.objs 1 addition, 0 deletionsstubs/Makefile.objs
- stubs/chr-testdev.c 7 additions, 0 deletionsstubs/chr-testdev.c
Loading
Please register or sign in to comment