summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2017-01-08 21:23:32 +0000
committermlarkin <mlarkin@openbsd.org>2017-01-08 21:23:32 +0000
commit75cec7fbe44a8c8ca5daad41b7e5b8f7d0f5f4b0 (patch)
treed44249d915f2a954f18c40e39fc7c2e8d3a0ed44
parentSync log.c with the latest version from vmd/log.c that preserves errno (diff)
downloadwireguard-openbsd-75cec7fbe44a8c8ca5daad41b7e5b8f7d0f5f4b0.tar.xz
wireguard-openbsd-75cec7fbe44a8c8ca5daad41b7e5b8f7d0f5f4b0.zip
Reduce "vmd -v" spam a bit by not printing useless exit information. These
were being printed because vmm(4) was in the middle of processing an exit that vmd(8) didn't care about, but still exited to vmd(8) because of a pending interrupt.
-rw-r--r--usr.sbin/vmd/vmm.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.sbin/vmd/vmm.c b/usr.sbin/vmd/vmm.c
index 0c9a3773734..343566edf32 100644
--- a/usr.sbin/vmd/vmm.c
+++ b/usr.sbin/vmd/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.60 2016/12/14 17:56:19 reyk Exp $ */
+/* $OpenBSD: vmm.c,v 1.61 2017/01/08 21:23:32 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -1309,6 +1309,17 @@ vcpu_exit(struct vm_run_params *vrp)
int ret;
switch (vrp->vrp_exit_reason) {
+ case VMX_EXIT_INT_WINDOW:
+ case VMX_EXIT_EXTINT:
+ case VMX_EXIT_EPT_VIOLATION:
+ /*
+ * 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
+ * these. In this case, there's nothing extra to be done
+ * here (and falling through to the default case below results
+ * in more vmd log spam).
+ */
+ break;
case VMX_EXIT_IO:
vcpu_exit_inout(vrp);
break;
@@ -1327,8 +1338,6 @@ vcpu_exit(struct vm_run_params *vrp)
return (ret);
}
break;
- case VMX_EXIT_INT_WINDOW:
- break;
case VMX_EXIT_TRIPLE_FAULT:
/* XXX reset VM since we do not support reboot yet */
return (EAGAIN);