Hi,
Would this change make it simpler to diagnose a vmm crash?
Nayden
Index: arch/amd64/amd64/vmm.c
===================================================================
RCS file: /home/nayden/cvsync/src/sys/arch/amd64/amd64/vmm.c,v
retrieving revision 1.207
diff -u -p -r1.207 vmm.c
--- arch/amd64/amd64/vmm.c 5 Jul 2018 04:36:14 -0000 1.207
+++ arch/amd64/amd64/vmm.c 9 Jul 2018 12:30:48 -0000
@@ -700,7 +700,7 @@ vm_rwregs(struct vm_rwregs_params *vrwp,
vcpu_readregs_svm(vcpu, vrwp->vrwp_mask, vrs) :
vcpu_writeregs_svm(vcpu, vrwp->vrwp_mask, vrs);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -1284,7 +1284,7 @@ vm_impl_init(struct vm *vm, struct proc
vmm_softc->mode == VMM_MODE_RVI)
return vm_impl_init_svm(vm, p);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -1333,7 +1333,7 @@ vm_impl_deinit(struct vm *vm)
vmm_softc->mode == VMM_MODE_RVI)
vm_impl_deinit_svm(vm);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -3020,7 +3020,7 @@ vcpu_reset_regs(struct vcpu *vcpu, struc
vmm_softc->mode == VMM_MODE_RVI)
ret = vcpu_reset_regs_svm(vcpu, vrs);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
return (ret);
}
@@ -3166,7 +3166,7 @@ vcpu_init(struct vcpu *vcpu)
vmm_softc->mode == VMM_MODE_RVI)
ret = vcpu_init_svm(vcpu);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
return (ret);
}
@@ -3244,7 +3244,7 @@ vcpu_deinit(struct vcpu *vcpu)
vmm_softc->mode == VMM_MODE_RVI)
vcpu_deinit_svm(vcpu);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -4725,7 +4725,7 @@ vmm_get_guest_faulttype(void)
else if (vmm_softc->mode == VMM_MODE_RVI)
return vmx_get_guest_faulttype();
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
Index: arch/i386/i386/vmm.c
===================================================================
RCS file: /home/nayden/cvsync/src/sys/arch/i386/i386/vmm.c,v
retrieving revision 1.39
diff -u -p -r1.39 vmm.c
--- arch/i386/i386/vmm.c 24 May 2018 07:27:41 -0000 1.39
+++ arch/i386/i386/vmm.c 9 Jul 2018 12:40:36 -0000
@@ -669,7 +669,7 @@ vm_rwregs(struct vm_rwregs_params *vrwp,
vcpu_readregs_svm(vcpu, vrwp->vrwp_mask, vrs) :
vcpu_writeregs_svm(vcpu, vrwp->vrwp_mask, vrs);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -1236,7 +1236,7 @@ vm_impl_init(struct vm *vm, struct proc
vmm_softc->mode == VMM_MODE_RVI)
return vm_impl_init_svm(vm, p);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -1276,7 +1276,7 @@ vm_impl_deinit(struct vm *vm)
vmm_softc->mode == VMM_MODE_RVI)
vm_impl_deinit_svm(vm);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -2592,7 +2592,7 @@ vcpu_reset_regs(struct vcpu *vcpu, struc
vmm_softc->mode == VMM_MODE_RVI)
ret = vcpu_reset_regs_svm(vcpu, vrs);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
return (ret);
}
@@ -2737,7 +2737,7 @@ vcpu_init(struct vcpu *vcpu)
vmm_softc->mode == VMM_MODE_RVI)
ret = vcpu_init_svm(vcpu);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
return (ret);
}
@@ -2810,7 +2810,7 @@ vcpu_deinit(struct vcpu *vcpu)
vmm_softc->mode == VMM_MODE_RVI)
vcpu_deinit_svm(vcpu);
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*
@@ -3885,7 +3885,7 @@ vmm_get_guest_faulttype(void)
else if (vmm_softc->mode == VMM_MODE_RVI)
return vmx_get_guest_faulttype();
else
- panic("unknown vmm mode");
+ panic("%s: unknown vmm mode: %d", __func__, vmm_softc->mode);
}
/*