1Overall: (9 cases) 2 3- Test method 4 * Add cases/soft-inj/panic/cases.sh into configuration file, and invoke 5 a test driver on it. 6- Common 7 * Test script of test cases in this file can be found in 8 cases/soft-inj/panic/cases.sh 9 101. fatal 11 12- Objective: 13 * Test MSR read logic of MCE handler 14 * Test synchronization between monarch and subject 15 * Test logic to recognize a fatal (PCC) MCE 16- Code path tested: 17 * do_machine_check() 18 * mce_start() 19 * mce_end() 20 * mce_reign() until mce_panic("Fatal Machine check",) 21 * mce_severity() 22 * mce_timeout() except if (*t <= 0) branch 23 * mce_panic() 24 * print_mce() 25 * mce_log() 26- Reference: 27 * Inject data file: cases/soft-inj/panic/data/fatal 28- Expected result: 29 * No warning or bug during kernel processing. 30 * MCE records collected via kernel panic log is same as reference ones. 31 * Kernel panic message is "Fatal Machine check" 32 * Exception message is "Processor context corrupt" 33 34 352. fatal timeout 36 37- Objective: 38 * Test logic of timeout during monarch/subject synchronization 39 * Test logic to recognize a fatal (PCC) MCE 40- Code path tested: 41 * do_machine_check() 42 * mce_start() 43 * mce_timeout() if (*t <= 0) branch 44 * mce_severity() 45 * mce_panic("Fatal machine check on current CPU",); 46 * print_mce() 47 * mce_log() 48- Reference: 49 * Inject data file: cases/soft-inj/panic/data/fatal_timeout 50- Expected result: 51 * No warning or bug during kernel processing. 52 * MCE records collected via kernel panic log is same as reference ones. 53 * Kernel panic message is "Fatal machine check on current CPU" 54 * Exception message is "Processor context corrupt" 55 * Timeout message is "Some CPUs didn't answer in synchronization" 56 57 583. fatal in irq 59 60- Objective: 61 * Test fatal MCE occur in IRQ context 62 * Test logic to recognize a fatal (PCC) MCE 63- Code path tested: 64 * Same as fatal 65- Reference: 66 * Inject data file: cases/soft-inj/panic/data/fatal_irq 67- Expected result: 68 * No warning or bug during kernel processing. 69 * MCE records collected via kernel panic log is same as reference ones. 70 * Kernel panic message is "Fatal Machine check" 71 * Exception message is "Processor context corrupt" 72 73 744. fatal with RIPV 75 76- Objective: 77 * Test combination of PCC and RIPV 78 * Test logic to recognize a fatal (PCC) MCE 79- Code path tested: 80 * MCG_STATUS_RIPV branch of switch(m.mcgstatus) in do_machine_check 81 * Others are same as fatal 82- Reference: 83 * Inject data file: cases/soft-inj/panic/data/fatal_ripv 84- Expected result: 85 * No warning or bug during kernel processing. 86 * MCE records collected via kernel panic log is same as reference ones. 87 * Kernel panic message is "Fatal Machine check" 88 * Exception message is "Processor context corrupt" 89 90 915. fatal timeout with RIPV 92 93- Objective: 94 * Test timeout logic of combination of PCC and RIPV 95 * Test logic to recognize a fatal (PCC) MCE 96- Code path tested: 97 * MCG_STATUS_RIPV branch of switch(m.mcgstatus) in do_machine_check 98 * Others are same as fatal_timeout 99- Reference: 100 * Inject data file: cases/soft-inj/panic/data/fatal_timeout_ripv 101- Expected result: 102 * No warning or bug during kernel processing. 103 * MCE records collected via kernel panic log is same as reference ones. 104 * Kernel panic message is "Fatal machine check on current CPU" 105 * Exception message is "Processor context corrupt" 106 * Timeout message is "Some CPUs didn't answer in synchronization" 107 108 1096. fatal with OVER 110 111- Objective: 112 * Test OVER flag in MCI_STATUS processing 113 * Test logic to recognize a fatal (PCC) MCE 114- Code path tested: 115 * Same as fatal 116- Reference: 117 * Inject data file: cases/soft-inj/panic/data/fatal_over 118- Expected result: 119 * No warning or bug during kernel processing. 120 * MCE records collected via kernel panic log is same as reference ones. 121 * Kernel panic message is "Fatal Machine check" 122 * Exception message is "Processor context corrupt" 123 124 1257. fatal and UC without EN 126 127- Objective: 128 * Test no EN processing. Only one MCE can be injected on one CPU, so 129 a MCE without EN are injected on other CPU. 130 * Test logic to recognize a fatal (PCC) MCE 131- Code path tested: 132 * Same as fatal except no EN branch in do_machine_check() 133- Reference: 134 * Inject data file: cases/soft-inj/panic/data/fatal_no_en 135 * Reference MCE records: cases/soft-inj/panic/refer/fatal_no_en 136- Expected result: 137 * No warning or bug during kernel processing. 138 * MCE records collected via kernel panic log is same as reference ones. 139 * Kernel panic message is "Machine check from unknown source" 140 * No exception message 141 1428. fatal with EIPV 143 144- Objective: 145 * Test combination of PCC and EIPV 146 * Test logic to recognize a fatal (PCC) MCE 147- Code path tested: 148 * Same as fatal 149- Reference: 150 * Inject data file: cases/soft-inj/panic/data/fatal_eipv 151- Expected result: 152 * No warning or bug during kernel processing. 153 * MCE records collected via kernel panic log is same as reference ones. 154 * Kernel panic message is "Fatal Machine check" 155 * Exception message is "Processor context corrupt" 156 157 1589. fatal in userspace 159 160- Objective: 161 * Test of PCC in userspace 162 * Test logic to recognize a fatal (PCC) MCE 163- Code path tested: 164 * Same as fatal 165- Reference: 166 * Inject data file: cases/soft-inj/panic/data/fatal_eipv 167- Expected result: 168 * No warning or bug during kernel processing. 169 * MCE records collected via kernel panic log is same as reference ones. 170 * Kernel panic message is "Fatal Machine check" 171 * Exception message is "Processor context corrupt" 172 173 174