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

Function vmcs_snapshot_any

freebsd/amd64/vmm/intel/vmcs.c:528–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528int
529vmcs_snapshot_any(struct vmcs *vmcs, int running, int ident,
530 struct vm_snapshot_meta *meta)
531{
532 int ret;
533 uint64_t val;
534
535 if (meta->op == VM_SNAPSHOT_SAVE) {
536 ret = vmcs_getany(vmcs, running, ident, &val);
537 if (ret != 0)
538 goto done;
539
540 SNAPSHOT_VAR_OR_LEAVE(val, meta, ret, done);
541 } else if (meta->op == VM_SNAPSHOT_RESTORE) {
542 SNAPSHOT_VAR_OR_LEAVE(val, meta, ret, done);
543
544 ret = vmcs_setany(vmcs, running, ident, val);
545 if (ret != 0)
546 goto done;
547 } else {
548 ret = EINVAL;
549 goto done;
550 }
551
552done:
553 return (ret);
554}
555#endif
556
557#ifdef DDB

Callers 1

vmx_vmcx_snapshotFunction · 0.85

Calls 2

vmcs_getanyFunction · 0.85
vmcs_setanyFunction · 0.85

Tested by

no test coverage detected