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

Function vm_snapshot_req

freebsd/amd64/vmm/vmm.c:2852–2894  ·  view source on GitHub ↗

* Save kernel-side structures to user-space for snapshotting. */

Source from the content-addressed store, hash-verified

2850 * Save kernel-side structures to user-space for snapshotting.
2851 */
2852int
2853vm_snapshot_req(struct vm *vm, struct vm_snapshot_meta *meta)
2854{
2855 int ret = 0;
2856
2857 switch (meta->dev_req) {
2858 case STRUCT_VMX:
2859 ret = vmmops_snapshot(vm->cookie, meta);
2860 break;
2861 case STRUCT_VMCX:
2862 ret = vm_snapshot_vmcx(vm, meta);
2863 break;
2864 case STRUCT_VM:
2865 ret = vm_snapshot_vm(vm, meta);
2866 break;
2867 case STRUCT_VIOAPIC:
2868 ret = vioapic_snapshot(vm_ioapic(vm), meta);
2869 break;
2870 case STRUCT_VLAPIC:
2871 ret = vlapic_snapshot(vm, meta);
2872 break;
2873 case STRUCT_VHPET:
2874 ret = vhpet_snapshot(vm_hpet(vm), meta);
2875 break;
2876 case STRUCT_VATPIC:
2877 ret = vatpic_snapshot(vm_atpic(vm), meta);
2878 break;
2879 case STRUCT_VATPIT:
2880 ret = vatpit_snapshot(vm_atpit(vm), meta);
2881 break;
2882 case STRUCT_VPMTMR:
2883 ret = vpmtmr_snapshot(vm_pmtmr(vm), meta);
2884 break;
2885 case STRUCT_VRTC:
2886 ret = vrtc_snapshot(vm_rtc(vm), meta);
2887 break;
2888 default:
2889 printf("%s: failed to find the requested type %#x\n",
2890 __func__, meta->dev_req);
2891 ret = (EINVAL);
2892 }
2893 return (ret);
2894}
2895
2896int
2897vm_set_tsc_offset(struct vm *vm, int vcpuid, uint64_t offset)

Callers 1

vmmdev_ioctlFunction · 0.85

Calls 15

vm_snapshot_vmcxFunction · 0.85
vm_snapshot_vmFunction · 0.85
vioapic_snapshotFunction · 0.85
vm_ioapicFunction · 0.85
vlapic_snapshotFunction · 0.85
vhpet_snapshotFunction · 0.85
vm_hpetFunction · 0.85
vatpic_snapshotFunction · 0.85
vm_atpicFunction · 0.85
vatpit_snapshotFunction · 0.85
vm_atpitFunction · 0.85
vpmtmr_snapshotFunction · 0.85

Tested by

no test coverage detected