From 84d090ecb766c459e564b76fbc9597ce01cd1625 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Sun, 28 May 2017 23:56:13 +0000 Subject: [PATCH] SVM: add some exit types Also, fix a comment that wasn't applicable anymore, and change a format from decimal to hex --- usr.sbin/vmd/vm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index 4183c5301bc..81f7b0ffb7c 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.17 2017/05/05 20:16:40 reyk Exp $ */ +/* $OpenBSD: vm.c,v 1.18 2017/05/28 23:56:13 mlarkin Exp $ */ /* * Copyright (c) 2015 Mike Larkin @@ -1101,10 +1101,14 @@ vcpu_exit(struct vm_run_params *vrp) switch (vrp->vrp_exit_reason) { case VMX_EXIT_INT_WINDOW: + case SVM_VMEXIT_VINTR: case VMX_EXIT_CPUID: case VMX_EXIT_EXTINT: + case SVM_VMEXIT_INTR: case VMX_EXIT_EPT_VIOLATION: case SVM_VMEXIT_NPF: + case SVM_VMEXIT_MSR: + case SVM_VMEXIT_CPUID: /* * We may be exiting to vmd to handle a pending interrupt but * at the same time the last exit type may have been one of @@ -1135,10 +1139,10 @@ vcpu_exit(struct vm_run_params *vrp) break; case VMX_EXIT_TRIPLE_FAULT: case SVM_VMEXIT_SHUTDOWN: - /* XXX reset VM since we do not support reboot yet */ + /* reset VM */ return (EAGAIN); default: - log_debug("%s: unknown exit reason %d", + log_debug("%s: unknown exit reason 0x%x", __progname, vrp->vrp_exit_reason); } -- 2.20.1