Page MenuHomeFreeBSD

vmm: Simplify saving of absolute TSC values in snapshots.
ClosedPublic

Authored by jhb on Oct 27 2022, 3:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:53 PM
Unknown Object (File)
Thu, Nov 7, 7:35 AM
Unknown Object (File)
Wed, Nov 6, 4:33 PM
Unknown Object (File)
Tue, Nov 5, 8:39 AM
Unknown Object (File)
Sat, Nov 2, 5:37 PM
Unknown Object (File)
Tue, Oct 29, 11:45 AM
Unknown Object (File)
Tue, Oct 22, 4:59 AM
Unknown Object (File)
Sat, Oct 19, 8:25 AM

Details

Summary

Pass the base TSC value in to vm_snapshot_vcpus and save the computed
absolute time rather than iterating over vCPUs multiple times.

Diff Detail

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

Event Timeline

rew added inline comments.
sys/amd64/vmm/vmm.c
2843

why not push this into vm_snapshot_vcpus()?

2854–2857

I think vm_snapshot_vcpu()'s will print an error out from the SNAPSHOT_VAR_OR_LEAVE macro if it fails - not sure this printf() is adding enough to keep it around.

sys/amd64/vmm/vmm.c
2843

Well, the goal of this commit is more about removing the hack that modifies tsc_offset and then unmodifies it, so I had left this alone. I guess it wouldn't hurt to move it though.

This revision is now accepted and ready to land.Nov 2 2022, 2:16 PM
jhb marked 2 inline comments as done.Nov 3 2022, 10:35 PM
  • Move now into the inner function.
This revision now requires review to proceed.Nov 3 2022, 10:35 PM
This revision is now accepted and ready to land.Nov 4 2022, 6:00 AM