Page MenuHomeFreeBSD

vmm vmx: Refactor per-vCPU data.
ClosedPublic

Authored by jhb on Oct 27 2022, 3:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 3 2024, 11:57 PM
Unknown Object (File)
Oct 3 2024, 7:07 PM
Unknown Object (File)
Oct 3 2024, 12:16 PM
Unknown Object (File)
Oct 3 2024, 9:47 AM
Unknown Object (File)
Oct 2 2024, 7:27 PM
Unknown Object (File)
Sep 28 2024, 1:29 AM
Unknown Object (File)
Sep 27 2024, 11:18 PM
Unknown Object (File)
Sep 27 2024, 7:32 PM

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.