vmm vmx: Refactor per-vCPU data.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 17:58:08 +0000 (09:58 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 18:25:35 +0000 (10:25 -0800)
commit0f00260c679f8d192f9d673fe4fb94b47a2ac6c5
tree21b51aa839ae97370ed5675ce307cef2553083fd
parent215d2fd53f6c254cb900e1775abae86d3fdada65
vmm vmx: Refactor per-vCPU data.

Add a struct vmx_vcpu to hold per-vCPU data specific to VT-x and
move parallel arrays out of struct vmx into a single array of
this structure.

While here, dynamically allocate the VMCS, APIC page and PIR
descriptors for each vCPU rather than embedding them.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37149
sys/amd64/vmm/intel/vmx.c
sys/amd64/vmm/intel/vmx.h
sys/amd64/vmm/intel/vmx_msr.c