diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-10-16 02:47:35 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-10-16 02:47:35 +0000 |
commit | 7fdce529691695723d1ad1cc1fa9825706720209 (patch) | |
tree | 7cf664c80a507bc262f14d5551be9a7448e73074 /usr.sbin/vmd | |
parent | d394c91ca325dce6f97a07b8a975d8846d66248b (diff) |
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.c | 7 |
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); |