Page MenuHomeFreeBSD

D38476.diff
No OneTemporary

D38476.diff

diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -184,7 +184,6 @@
typedef void (*vmi_vmspace_free)(struct vmspace *vmspace);
typedef struct vlapic * (*vmi_vlapic_init)(void *vcpui);
typedef void (*vmi_vlapic_cleanup)(struct vlapic *vlapic);
-typedef int (*vmi_snapshot_t)(void *vmi, struct vm_snapshot_meta *meta);
typedef int (*vmi_snapshot_vcpu_t)(void *vcpui, struct vm_snapshot_meta *meta);
typedef int (*vmi_restore_tsc_t)(void *vcpui, uint64_t now);
@@ -210,7 +209,6 @@
vmi_vlapic_cleanup vlapic_cleanup;
/* checkpoint operations */
- vmi_snapshot_t snapshot;
vmi_snapshot_vcpu_t vcpu_snapshot;
vmi_restore_tsc_t restore_tsc;
};
diff --git a/sys/amd64/include/vmm_snapshot.h b/sys/amd64/include/vmm_snapshot.h
--- a/sys/amd64/include/vmm_snapshot.h
+++ b/sys/amd64/include/vmm_snapshot.h
@@ -47,8 +47,7 @@
struct vmctx;
enum snapshot_req {
- STRUCT_VMX,
- STRUCT_VIOAPIC,
+ STRUCT_VIOAPIC = 1,
STRUCT_VM,
STRUCT_VLAPIC,
VM_MEM,
diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -2415,15 +2415,6 @@
}
#ifdef BHYVE_SNAPSHOT
-static int
-svm_snapshot(void *vmi, struct vm_snapshot_meta *meta)
-{
- if (meta->op == VM_SNAPSHOT_RESTORE)
- flush_by_asid();
-
- return (0);
-}
-
static int
svm_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
{
@@ -2656,7 +2647,6 @@
.vlapic_init = svm_vlapic_init,
.vlapic_cleanup = svm_vlapic_cleanup,
#ifdef BHYVE_SNAPSHOT
- .snapshot = svm_snapshot,
.vcpu_snapshot = svm_vcpu_snapshot,
.restore_tsc = svm_restore_tsc,
#endif
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -4093,12 +4093,6 @@
}
#ifdef BHYVE_SNAPSHOT
-static int
-vmx_snapshot(void *vmi, struct vm_snapshot_meta *meta)
-{
- return (0);
-}
-
static int
vmx_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
{
@@ -4254,7 +4248,6 @@
.vlapic_init = vmx_vlapic_init,
.vlapic_cleanup = vmx_vlapic_cleanup,
#ifdef BHYVE_SNAPSHOT
- .snapshot = vmx_snapshot,
.vcpu_snapshot = vmx_vcpu_snapshot,
.restore_tsc = vmx_restore_tsc,
#endif
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -254,7 +254,6 @@
DEFINE_VMMOPS_IFUNC(struct vlapic *, vlapic_init, (void *vcpui))
DEFINE_VMMOPS_IFUNC(void, vlapic_cleanup, (struct vlapic *vlapic))
#ifdef BHYVE_SNAPSHOT
-DEFINE_VMMOPS_IFUNC(int, snapshot, (void *vmi, struct vm_snapshot_meta *meta))
DEFINE_VMMOPS_IFUNC(int, vcpu_snapshot, (void *vcpui,
struct vm_snapshot_meta *meta))
DEFINE_VMMOPS_IFUNC(int, restore_tsc, (void *vcpui, uint64_t now))
@@ -2917,9 +2916,6 @@
int ret = 0;
switch (meta->dev_req) {
- case STRUCT_VMX:
- ret = vmmops_snapshot(vm->cookie, meta);
- break;
case STRUCT_VMCX:
ret = vm_snapshot_vcpu(vm, meta);
break;
diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c
--- a/usr.sbin/bhyve/snapshot.c
+++ b/usr.sbin/bhyve/snapshot.c
@@ -155,7 +155,6 @@
static const struct vm_snapshot_kern_info snapshot_kern_structs[] = {
{ "vhpet", STRUCT_VHPET },
{ "vm", STRUCT_VM },
- { "vmx", STRUCT_VMX },
{ "vioapic", STRUCT_VIOAPIC },
{ "vlapic", STRUCT_VLAPIC },
{ "vmcx", STRUCT_VMCX },

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 3:28 AM (11 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14637816
Default Alt Text
D38476.diff (3 KB)

Event Timeline