MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_restore_time

Function vm_restore_time

freebsd/amd64/vmm/vmm.c:2910–2933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2908}
2909
2910int
2911vm_restore_time(struct vm *vm)
2912{
2913 int error, i;
2914 uint64_t now;
2915 struct vcpu *vcpu;
2916
2917 now = rdtsc();
2918
2919 error = vhpet_restore_time(vm_hpet(vm));
2920 if (error)
2921 return (error);
2922
2923 for (i = 0; i < nitems(vm->vcpu); i++) {
2924 vcpu = &vm->vcpu[i];
2925
2926 error = vmmops_restore_tsc(vm->cookie, i, vcpu->tsc_offset -
2927 now);
2928 if (error)
2929 return (error);
2930 }
2931
2932 return (0);
2933}
2934#endif

Callers 1

vmmdev_ioctlFunction · 0.85

Calls 3

vhpet_restore_timeFunction · 0.85
vm_hpetFunction · 0.85
rdtscFunction · 0.50

Tested by

no test coverage detected