Not stopping VCPUs before leads to seg faults and other errors due to
synchronization between threads.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
#include "kvm/term.h"
#include "kvm/util.h"
#include "kvm/kvm.h"
+#include "kvm/kvm-cpu.h"
extern struct kvm *kvm;
static struct termios orig_term;
if (term_got_escape) {
term_got_escape = false;
if (c == 'x') {
+ kvm_cpu__reboot();
kvm__delete(kvm);
printf("\n # KVM session terminated.\n");
exit(1);