HomeFreeBSD

vmm: Refactor storage of CPU-dependent per-vCPU data.

Description

vmm: Refactor storage of CPU-dependent per-vCPU data.

Rather than storing static arrays of per-vCPU data in the CPU-specific
per-VM structure, adopt a more dynamic model similar to that used to
manage CPU-specific per-VM data.

That is, add new vmmops methods to init and cleanup a single vCPU.
The init method returns a pointer that is stored in 'struct vcpu' as a
cookie pointer. This cookie pointer is now passed to other vmmops
callbacks in place of the integer index. The index is now only used
in KTR traces and when calling back into the CPU-independent layer.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37151

Details

Provenance
jhbAuthored on Nov 18 2022, 5:59 PM
Reviewer
corvink
Differential Revision
D37151: vmm: Refactor storage of CPU-dependent per-vCPU data.
Parents
rG73abae449378: vmm vmx: Add a global bool to indicate if the host has the TSC_AUX MSR.
Branches
Unknown
Tags
Unknown