Page MenuHomeFreeBSD

vmm: move bumping VMEXIT_USERSPACE stat to the right place
ClosedPublic

Authored by gusev.vitaliy_gmail.com on May 30 2022, 1:46 PM.
Tags
Referenced Files
Unknown Object (File)
Tue, Nov 18, 1:52 AM
Unknown Object (File)
Mon, Nov 17, 1:25 PM
Unknown Object (File)
Mon, Nov 17, 8:26 AM
Unknown Object (File)
Sun, Nov 16, 8:59 PM
Unknown Object (File)
Sun, Nov 16, 5:20 PM
Unknown Object (File)
Tue, Nov 11, 11:30 AM
Unknown Object (File)
Thu, Nov 6, 3:45 PM
Unknown Object (File)
Thu, Nov 6, 1:33 AM
Subscribers

Details

Summary
Statistic for "number of vm exits handled in userspace" should be
increased in vm_run() instead of vmx_run() because in some cases
vm_run() doesn't exit to userspace and keeps entering the guest.

Also svm_run's implementation even wrongly misses that stat.
Test Plan

Getting statistic since boot&halt before patching

~# bhyvectl --get-stat --vm=$VM | grep userspace

number of vm exits handled in userspace 	228650

Geting statistic since boot&halt after patching

~# bhyvectl --get-stat --vm=$VM | grep userspace

number of vm exits handled in userspace 	139744

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable