Ensure that all segment registers have zero in the low two bits before transitioning to protected mode. This allows the CPU state to immediately be deemed to be "valid", and eliminates the need for any further emulated instructions. Load the protected-mode interrupt descriptor table after switching to protected mode, since this avoids triggering an EXCEPTION_NMI and corresponding VM exit. This reduces the time taken by real_to_prot under KVM by around 50%. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
522 |
|
522 |
|
523 |
|
523 |
|
524 |
|
524 |
|
525 |
|
|
|
|
525 |
|
|
|
526 |
|
|
|
527 |
|
|
526 |
|
528 |
|
|
529 |
|
|
527 |
|
530 |
|
528 |
|
531 |
|
529 |
|
532 |
|
|
|
||
200 |
|
200 |
|
201 |
|
201 |
|
202 |
|
202 |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
|
|
|
206 |
|
|
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
|
210 |
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
203 |
|
217 |
|
204 |
|
218 |
|
205 |
|
|
|
206 |
|
|
|
207 |
|
219 |
|
208 |
|
220 |
|
209 |
|
221 |
|
|
|
||
220 |
|
232 |
|
221 |
|
233 |
|
222 |
|
234 |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
223 |
|
238 |
|
224 |
|
239 |
|
225 |
|
240 |
|
|
|
||
26 |
|
26 |
|
27 |
|
27 |
|
28 |
|
28 |
|
29 |
|
|
|
|
29 |
|
|
30 |
|
30 |
|
31 |
|
31 |
|
32 |
|
|
|
33 |
|
32 |
|
34 |
|
33 |
|
35 |
|
34 |
|