diff options
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/vmx.c | 6 | ||||
-rw-r--r-- | drivers/kvm/vmx.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 5cc1a6ec0174..e152caa9d9f9 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1375,6 +1375,11 @@ static int handle_external_interrupt(struct kvm_vcpu *vcpu, | |||
1375 | return 1; | 1375 | return 1; |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | static int handle_triple_fault(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | ||
1379 | { | ||
1380 | kvm_run->exit_reason = KVM_EXIT_SHUTDOWN; | ||
1381 | return 0; | ||
1382 | } | ||
1378 | 1383 | ||
1379 | static int get_io_count(struct kvm_vcpu *vcpu, u64 *count) | 1384 | static int get_io_count(struct kvm_vcpu *vcpu, u64 *count) |
1380 | { | 1385 | { |
@@ -1635,6 +1640,7 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu, | |||
1635 | struct kvm_run *kvm_run) = { | 1640 | struct kvm_run *kvm_run) = { |
1636 | [EXIT_REASON_EXCEPTION_NMI] = handle_exception, | 1641 | [EXIT_REASON_EXCEPTION_NMI] = handle_exception, |
1637 | [EXIT_REASON_EXTERNAL_INTERRUPT] = handle_external_interrupt, | 1642 | [EXIT_REASON_EXTERNAL_INTERRUPT] = handle_external_interrupt, |
1643 | [EXIT_REASON_TRIPLE_FAULT] = handle_triple_fault, | ||
1638 | [EXIT_REASON_IO_INSTRUCTION] = handle_io, | 1644 | [EXIT_REASON_IO_INSTRUCTION] = handle_io, |
1639 | [EXIT_REASON_CR_ACCESS] = handle_cr, | 1645 | [EXIT_REASON_CR_ACCESS] = handle_cr, |
1640 | [EXIT_REASON_DR_ACCESS] = handle_dr, | 1646 | [EXIT_REASON_DR_ACCESS] = handle_dr, |
diff --git a/drivers/kvm/vmx.h b/drivers/kvm/vmx.h index 4c0ab151836a..d0dc93df411b 100644 --- a/drivers/kvm/vmx.h +++ b/drivers/kvm/vmx.h | |||
@@ -180,6 +180,7 @@ enum vmcs_field { | |||
180 | 180 | ||
181 | #define EXIT_REASON_EXCEPTION_NMI 0 | 181 | #define EXIT_REASON_EXCEPTION_NMI 0 |
182 | #define EXIT_REASON_EXTERNAL_INTERRUPT 1 | 182 | #define EXIT_REASON_EXTERNAL_INTERRUPT 1 |
183 | #define EXIT_REASON_TRIPLE_FAULT 2 | ||
183 | 184 | ||
184 | #define EXIT_REASON_PENDING_INTERRUPT 7 | 185 | #define EXIT_REASON_PENDING_INTERRUPT 7 |
185 | 186 | ||