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

Function svm_set_tsc_offset

freebsd/amd64/vmm/amd/svm.c:285–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283
284#ifdef BHYVE_SNAPSHOT
285int
286svm_set_tsc_offset(struct svm_softc *sc, int vcpu, uint64_t offset)
287{
288 int error;
289 struct vmcb_ctrl *ctrl;
290
291 ctrl = svm_get_vmcb_ctrl(sc, vcpu);
292 ctrl->tsc_offset = offset;
293
294 svm_set_dirty(sc, vcpu, VMCB_CACHE_I);
295 VCPU_CTR1(sc->vm, vcpu, "tsc offset changed to %#lx", offset);
296
297 error = vm_set_tsc_offset(sc->vm, vcpu, offset);
298
299 return (error);
300}
301#endif
302
303/* Pentium compatible MSRs */

Callers 2

svm_wrmsrFunction · 0.85
svm_restore_tscFunction · 0.85

Calls 3

svm_get_vmcb_ctrlFunction · 0.85
svm_set_dirtyFunction · 0.85
vm_set_tsc_offsetFunction · 0.85

Tested by

no test coverage detected