aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kvm/process.c')
-rw-r--r--arch/ia64/kvm/process.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/ia64/kvm/process.c b/arch/ia64/kvm/process.c
index cefc349ce354..552d07724207 100644
--- a/arch/ia64/kvm/process.c
+++ b/arch/ia64/kvm/process.c
@@ -942,8 +942,20 @@ static void vcpu_do_resume(struct kvm_vcpu *vcpu)
942 ia64_set_pta(vcpu->arch.vhpt.pta.val); 942 ia64_set_pta(vcpu->arch.vhpt.pta.val);
943} 943}
944 944
945static void vmm_sanity_check(struct kvm_vcpu *vcpu)
946{
947 struct exit_ctl_data *p = &vcpu->arch.exit_data;
948
949 if (!vmm_sanity && p->exit_reason != EXIT_REASON_DEBUG) {
950 panic_vm(vcpu, "Failed to do vmm sanity check,"
951 "it maybe caused by crashed vmm!!\n\n");
952 }
953}
954
945static void kvm_do_resume_op(struct kvm_vcpu *vcpu) 955static void kvm_do_resume_op(struct kvm_vcpu *vcpu)
946{ 956{
957 vmm_sanity_check(vcpu); /*Guarantee vcpu runing on healthy vmm!*/
958
947 if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) { 959 if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) {
948 vcpu_do_resume(vcpu); 960 vcpu_do_resume(vcpu);
949 return; 961 return;
@@ -969,3 +981,11 @@ void vmm_transition(struct kvm_vcpu *vcpu)
969 1, 0, 0, 0, 0, 0); 981 1, 0, 0, 0, 0, 0);
970 kvm_do_resume_op(vcpu); 982 kvm_do_resume_op(vcpu);
971} 983}
984
985void vmm_panic_handler(u64 vec)
986{
987 struct kvm_vcpu *vcpu = current_vcpu;
988 vmm_sanity = 0;
989 panic_vm(vcpu, "Unexpected interruption occurs in VMM, vector:0x%lx\n",
990 vec2off[vec]);
991}