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 19, 7:14 AM
Unknown Object (File)
Nov 14 2024, 10:28 PM
Unknown Object (File)
Oct 30 2024, 5:58 AM
Unknown Object (File)
Oct 19 2024, 7:20 AM
Unknown Object (File)
Sep 30 2024, 2:51 AM
Unknown Object (File)
Sep 24 2024, 6:59 AM
Unknown Object (File)
Sep 23 2024, 10:57 PM
Unknown Object (File)
Sep 21 2024, 4:52 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