File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,11 @@ int acrn_handle_pending_request(struct vcpu *vcpu)
304
304
bool intr_pending = false;
305
305
uint64_t * pending_req_bits = & vcpu -> arch_vcpu .pending_req ;
306
306
307
+ if (bitmap_test_and_clear (ACRN_REQUEST_TRP_FAULT , pending_req_bits )) {
308
+ pr_fatal ("Triple fault happen -> shutdown!" );
309
+ return - EFAULT ;
310
+ }
311
+
307
312
if (bitmap_test_and_clear (ACRN_REQUEST_TLB_FLUSH , pending_req_bits ))
308
313
invept (vcpu );
309
314
Original file line number Diff line number Diff line change @@ -64,7 +64,12 @@ void vcpu_thread(struct vcpu *vcpu)
64
64
CPU_IRQ_DISABLE ();
65
65
66
66
/* Check and process pending requests(including interrupt) */
67
- acrn_handle_pending_request (vcpu );
67
+ ret = acrn_handle_pending_request (vcpu );
68
+ if (ret < 0 ) {
69
+ pr_fatal ("vcpu handling pending request fail" );
70
+ pause_vcpu (vcpu , VCPU_ZOMBIE );
71
+ continue ;
72
+ }
68
73
69
74
if (need_rescheduled (vcpu -> pcpu_id )) {
70
75
/*
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ int get_req_info(char *str, int str_max);
70
70
#define ACRN_REQUEST_GP 3
71
71
#define ACRN_REQUEST_TMR_UPDATE 4
72
72
#define ACRN_REQUEST_TLB_FLUSH 5
73
+ #define ACRN_REQUEST_TRP_FAULT 6
73
74
74
75
#define E820_MAX_ENTRIES 32
75
76
Original file line number Diff line number Diff line change 41
41
#define EIO 4
42
42
/** Indicates that target is busy. */
43
43
#define EBUSY 5
44
+ /** Indicates there is fault. */
45
+ #define EFAULT 6
44
46
45
47
#endif /* ERRNO_H */
You can’t perform that action at this time.
0 commit comments