Page MenuHomeFreeBSD

vmm vmx: Refactor per-vCPU data.
ClosedPublic

Authored by jhb on Oct 27 2022, 3:03 PM.
Tags
None
Referenced Files
F97152954: D37149.diff
Fri, Sep 27, 11:18 PM
F97110386: D37149.diff
Fri, Sep 27, 7:32 PM
F97086040: D37149.diff
Fri, Sep 27, 5:40 PM
F97086021: D37149.diff
Fri, Sep 27, 5:40 PM
Unknown Object (File)
Sun, Sep 15, 4:06 AM
Unknown Object (File)
Jul 25 2024, 6:27 PM
Unknown Object (File)
Jul 24 2024, 6:30 AM
Unknown Object (File)
Jun 29 2024, 2:38 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48021
Build 44908: arc lint + arc unit

Event Timeline

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

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
1452
3885

Nit: most other functions call the variable vmx_vcpu.

3910

Nit: most other functions call it vmx_vcpu.

4103

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
3885

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.