| 283 | |
| 284 | #ifdef BHYVE_SNAPSHOT |
| 285 | int |
| 286 | svm_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 */ |
no test coverage detected