Bug #14703
closed
Added by Patrick Mooney 3 months ago.
Updated 2 months ago.
Description
The kernel portion of bhyve has a number of 'KTR' macro calls, which is a text-based tracing facility in FreeBSD. It was never wired up when bhyve was ported, due to the immense probe effect and likely little value it would deliver, compared to what's possible with dtrace.
It would be nice to clean up those KTR macros.
With the proposed change in place, the bhyve tests still all pass:
Test: /opt/bhyve-tests/tests/mevent/vnode_zvol (run as root) [00:02] [PASS]
Test: /opt/bhyve-tests/tests/inst_emul/rdmsr (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/inst_emul/wrmsr (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/inst_emul/triple_fault (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vatpit_freq (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vhpet_freq (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vlapic_freq (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vlapic_freq_periodic (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vlapic_mmio_access (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vlapic_msr_access (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/kdev/vpmtmr_freq (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/mevent/lists_delete (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/mevent/read_disable (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/mevent/read_pause (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/mevent/read_requeue (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/mevent/vnode_file (run as root) [00:09] [PASS]
Test: /opt/bhyve-tests/tests/vmm/fpu_getset (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/vmm/interface_version (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/vmm/mem_devmem (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/vmm/mem_partial (run as root) [00:00] [PASS]
Test: /opt/bhyve-tests/tests/vmm/mem_seg_map (run as root) [00:00] [PASS]
Results Summary
PASS 21
Running Time: 00:00:13
Percent passed: 100.0%
Log directory: /var/tmp/test_results/20220607T234926
A wsdiff comparison of vanilla bits against those built from the change reflect a few things:
1. Line numbers for asserts will change, thanks to the removed CTR/KTR macro calls
2. References to members in struct vm
which were after the removed name
field will see their offset calculations differ
3. Logic for vm creation in vm_create
and vmmdev_do_vm_create
will differ since the name is no longer passed in from the outer device logic.
4. The vm_name
text is gone since it was removed.
We do see those in the wsdiff output.
I ran the test suite on both AMD and Intel hardware, in addition to the normal battery of guest smoke tests. All of it ran clean with the patch applied.
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit d4f59ae5164748e530cad42bd54b9b909d0c1ee8
commit d4f59ae5164748e530cad42bd54b9b909d0c1ee8
Author: Patrick Mooney <pmooney@pfmooney.com>
Date: 2022-06-09T18:13:35.000Z
14703 clean KTR from bhyve
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Also available in: Atom
PDF