Page MenuHomeFreeBSD

vmx: Implement pmap (de)activation in C
ClosedPublic

Authored by markj on Oct 17 2020, 3:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 28 2025, 4:39 AM
Unknown Object (File)
Nov 26 2025, 2:34 AM
Unknown Object (File)
Nov 21 2025, 2:27 AM
Unknown Object (File)
Nov 20 2025, 10:15 PM
Unknown Object (File)
Nov 20 2025, 10:15 PM
Unknown Object (File)
Nov 20 2025, 10:12 PM
Unknown Object (File)
Nov 20 2025, 10:02 PM
Unknown Object (File)
Nov 18 2025, 12:55 AM
Subscribers

Details

Summary

Currently we update pm_active and invoke invept from vmx_enter_guest(),
but is no apparent reason these can't be done before the call. The
invalidation algorithm is easier to modify and audit when it's written
in C, so let's rewrite it.

This is NFC except that the VMM no longer tries to handle errors from
invept. invept can fail for two reasons:

  • the invept type is not supported, but we check this in ept_init()
  • the eptp value is invalid, which I believe should never happen

So with this change, an error from invept results in a panic, and I
removed VMX_INVEPT_ERROR handling.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable