Page MenuHomeFreeBSD

vmm vmx: Add a global bool to indicate if the host has the TSC_AUX MSR.
ClosedPublic

Authored by jhb on Nov 4 2022, 6:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 10:47 PM
Unknown Object (File)
Feb 15 2024, 5:37 AM
Unknown Object (File)
Feb 15 2024, 5:37 AM
Unknown Object (File)
Feb 15 2024, 5:37 AM
Unknown Object (File)
Feb 15 2024, 5:37 AM
Unknown Object (File)
Feb 15 2024, 5:37 AM
Unknown Object (File)
Feb 15 2024, 3:53 AM
Unknown Object (File)
Feb 2 2024, 11:02 AM
Subscribers

Details

Summary

A future commit will remove direct access to vCPU structures from
struct vmx, so add a dedicated boolean for this rather than checking
the capabilities for vCPU 0.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Nov 4 2022, 6:06 PM

After splitting this out and looking at it again, I think it probably makes sense for it to just be a global bool rather than buried in struct vmx, but I wanted to upload the initial version for comparison.

jhb retitled this revision from vmm vmx: Add bool to indicate if the host has the TSC_AUX MSR. to vmm vmx: Add a global bool to indicate if the host has the TSC_AUX MSR..Nov 4 2022, 8:13 PM
markj added inline comments.
sys/amd64/vmm/intel/vmx.c
213

Did you mean to add a sysctl for this? It seems a bit odd to stick it in the middle of the sysctl definitions otherwise.

This revision is now accepted and ready to land.Nov 4 2022, 11:11 PM
sys/amd64/vmm/intel/vmx.c
213

I did not plan for a sysctl for it, no. I'm not sure where else to put this declaration. I had kind of put it in this block here in between sysctl blocks since it is related to cap_rdpid and cap_rdtscp. I can look to see if I can find a less confusing place for it.

This revision now requires review to proceed.Nov 7 2022, 11:10 PM
This revision is now accepted and ready to land.Nov 8 2022, 6:45 AM