summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2019-10-16 02:47:34 +0000
committermlarkin <mlarkin@openbsd.org>2019-10-16 02:47:34 +0000
commit8e646ea0b11a292b33f4d94455d6ec089da09784 (patch)
tree52698650d7ccf1ebbcb1d018dc2a565278acf7d2 /usr.sbin/vmd
parentAdd a few newer _OSI strings to the parser. (diff)
downloadwireguard-openbsd-8e646ea0b11a292b33f4d94455d6ec089da09784.tar.xz
wireguard-openbsd-8e646ea0b11a292b33f4d94455d6ec089da09784.zip
vmd(8): provide some additional info in a debug msg
Print the guest %rip when it tries to do I/O to a nonexistent port. Also convert the message to a DPRINTF so that it doesn't leak guest address information into any logging the host might be doing under normal non-debug conditions.
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r--usr.sbin/vmd/pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/vmd/pci.c b/usr.sbin/vmd/pci.c
index ef7053e9594..954235eb63f 100644
--- a/usr.sbin/vmd/pci.c
+++ b/usr.sbin/vmd/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.27 2018/07/12 10:15:44 mlarkin Exp $ */
+/* $OpenBSD: pci.c,v 1.28 2019/10/16 02:47:34 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -286,8 +286,9 @@ pci_handle_io(struct vm_run_params *vrp)
__progname);
}
} else {
- log_warnx("%s: no pci i/o function for reg 0x%llx",
- __progname, (uint64_t)reg);
+ DPRINTF("%s: no pci i/o function for reg 0x%llx (dir=%d "
+ "guest %%rip=0x%llx", __progname, (uint64_t)reg, dir,
+ vei->vrs.vrs_gprs[VCPU_REGS_RIP]);
/* Reads from undefined ports return 0xFF */
if (dir == VEI_DIR_IN)
set_return_data(vei, 0xFFFFFFFF);