Page MenuHomeFreeBSD

vmm vmx: Refactor per-vCPU data.
ClosedPublic

Authored by jhb on Oct 27 2022, 3:03 PM.
Tags
None
Referenced Files
F82205152: D37149.diff
Fri, Apr 26, 11:56 AM
Unknown Object (File)
Wed, Apr 24, 2:26 PM
Unknown Object (File)
Wed, Apr 24, 2:25 PM
Unknown Object (File)
Wed, Apr 24, 2:25 PM
Unknown Object (File)
Wed, Apr 24, 2:25 PM
Unknown Object (File)
Sun, Apr 21, 8:19 PM
Unknown Object (File)
Feb 15 2024, 6:14 AM
Unknown Object (File)
Feb 15 2024, 6:14 AM

Details

Summary

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.

Diff Detail

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

Event Timeline

sys/amd64/vmm/intel/vmx.c
1112

Shouldn't this use malloc_aligned() as well? If only to document the alignment requirement.

jhb marked an inline comment as done.Nov 3 2022, 11:14 PM
corvink added a reviewer: manu.
corvink added a subscriber: corvink.
corvink added inline comments.
sys/amd64/vmm/intel/vmx.c
1455
3888

Nit: most other functions call the variable vmx_vcpu.

3913

Nit: most other functions call it vmx_vcpu.

4106

Nit: most other functions call it vmx_vcpu.

This revision is now accepted and ready to land.Nov 4 2022, 7:10 AM
jhb marked an inline comment as done.Nov 7 2022, 11:34 PM
jhb added inline comments.
sys/amd64/vmm/intel/vmx.c
3888

By the end of the series these are all named vcpu both here and in svm.c. At this stage of the series I used vmx_vcpu when there was already a local parameter int vcpu or the like that at a later stage became either void *vcpui or struct vmx_vcpu *vcpu.

This revision was automatically updated to reflect the committed changes.