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
F82015168: D37146.id113285.diff
Wed, Apr 24, 1:51 PM
F82015152: D37146.id112255.diff
Wed, Apr 24, 1:50 PM
F82015150: D37146.id112572.diff
Wed, Apr 24, 1:50 PM
F82015146: D37146.id.diff
Wed, Apr 24, 1:50 PM
Unknown Object (File)
Sun, Apr 21, 8:16 PM
Unknown Object (File)
Feb 15 2024, 5:53 AM
Unknown Object (File)
Feb 15 2024, 5:53 AM
Unknown Object (File)
Feb 15 2024, 5:53 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