An "enlightened" external bootloader (such as Windows Server 2016's winload.exe) may take ownership of the Hyper-V connection before all INT 13 operations have been completed. When this happens, all VMBus devices are implicitly closed and we are left with a non-functional network connection. Detect when our Hyper-V connection has been lost (by checking the SynIC message page MSR). Reclaim ownership of the Hyper-V connection and reestablish any VMBus devices, without disrupting any existing iPXE state (such as IPv4 settings attached to the network device). Windows Server 2016 will not cleanly take ownership of an active Hyper-V connection. Experimentation shows that we can quiesce by resetting only the SynIC message page MSR; this results in a successful SAN boot (on a Windows 2012 R2 physical host). Choose to quiesce by resetting (almost) all MSRs, in the hope that this will be more robust against corner cases such as a stray synthetic interrupt occurring during the handover. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
40 | 40 |
|
41 | 41 |
|
42 | 42 |
|
43 |
|
|
43 | 44 |
|
44 | 45 |
|
45 | 46 |
|
|
||
299 | 300 |
|
300 | 301 |
|
301 | 302 |
|
303 |
|
|
304 |
|
|
305 |
|
|
306 |
|
|
302 | 307 |
|
303 | 308 |
|
304 | 309 |
|
|
||
321 | 326 |
|
322 | 327 |
|
323 | 328 |
|
324 |
|
|
329 |
|
|
325 | 330 |
|
326 | 331 |
|
327 | 332 |
|
328 |
|
|
329 |
|
|
333 |
|
|
330 | 334 |
|
331 | 335 |
|
332 | 336 |
|
333 |
|
|
334 |
|
|
335 |
|
|
336 |
|
|
337 |
|
|
338 |
|
|
339 | 337 |
|
340 | 338 |
|
341 | 339 |
|
|
||
349 | 347 |
|
350 | 348 |
|
351 | 349 |
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
|
360 |
|
|
361 |
|
|
362 |
|
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
|
|
352 | 368 |
|
353 | 369 |
|
354 | 370 |
|
|
||
385 | 401 |
|
386 | 402 |
|
387 | 403 |
|
388 |
|
|
404 |
|
|
389 | 405 |
|
406 |
|
|
407 |
|
|
408 |
|
|
409 |
|
|
390 | 410 |
|
391 | 411 |
|
392 | 412 |
|
|
||
589 | 609 |
|
590 | 610 |
|
591 | 611 |
|
612 |
|
|
592 | 613 |
|
593 | 614 |
|
594 | 615 |
|
|
||
603 | 624 |
|
604 | 625 |
|
605 | 626 |
|
627 |
|
|
628 |
|
|
629 |
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
637 |
|
|
638 |
|
|
639 |
|
|
640 |
|
|
641 |
|
|
642 |
|
|
643 |
|
|
644 |
|
|
645 |
|
|
646 |
|
|
647 |
|
|
648 |
|
|
649 |
|
|
650 |
|
|
651 |
|
|
652 |
|
|
653 |
|
|
654 |
|
|
655 |
|
|
656 |
|
|
657 |
|
|
658 |
|
|
659 |
|
|
660 |
|
|
661 |
|
|
662 |
|
|
663 |
|
|
664 |
|
|
665 |
|
|
666 |
|
|
667 |
|
|
668 |
|
|
669 |
|
|
670 |
|
|
671 |
|
|
672 |
|
|
673 |
|
|
674 |
|
|
675 |
|
|
676 |
|
|
677 |
|
|
678 |
|
|
679 |
|
|
680 |
|
|
681 |
|
|
682 |
|
|
683 |
|
|
684 |
|
|
685 |
|
|
686 |
|
|
687 |
|
|
688 |
|
|
689 |
|
|
690 |
|
|
691 |
|
|
692 |
|
|
693 |
|
|
694 |
|
|
695 |
|
|
696 |
|
|
697 |
|
|
698 |
|
|
699 |
|
|
700 |
|
|
701 |
|
|
702 |
|
|
703 |
|
|
704 |
|
|
705 |
|
|
706 |
|
|
707 |
|
|
708 |
|
|
709 |
|
|
710 |
|
|
711 |
|
|
712 |
|
|
713 |
|
|
714 |
|
|
715 |
|
|
716 |
|
|
717 |
|
|
718 |
|
|
719 |
|
|
720 |
|
|
606 | 721 |
|
607 | 722 |
|
608 | 723 |
|
|
||
259 | 259 |
|
260 | 260 |
|
261 | 261 |
|
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
|
|
267 |
|
|
268 |
|
|
269 |
|
|
270 |
|
|
262 | 271 |
|
263 | 272 |
|
264 | 273 |
|
|
||
474 | 483 |
|
475 | 484 |
|
476 | 485 |
|
486 |
|
|
487 |
|
|
488 |
|
|
489 |
|
|
490 |
|
|
491 |
|
|
492 |
|
|
493 |
|
|
477 | 494 |
|
478 | 495 |
|
479 | 496 |
|
|
||
823 | 840 |
|
824 | 841 |
|
825 | 842 |
|
843 |
|
|
844 |
|
|
845 |
|
|
846 |
|
|
847 |
|
|
848 |
|
|
849 |
|
|
850 |
|
|
851 |
|
|
852 |
|
|
853 |
|
|
854 |
|
|
855 |
|
|
856 |
|
|
857 |
|
|
858 |
|
|
859 |
|
|
860 |
|
|
861 |
|
|
862 |
|
|
863 |
|
|
864 |
|
|
865 |
|
|
866 |
|
|
867 |
|
|
868 |
|
|
869 |
|
|
870 |
|
|
871 |
|
|
826 | 872 |
|
827 | 873 |
|
828 | 874 |
|
|
||
844 | 890 |
|
845 | 891 |
|
846 | 892 |
|
893 |
|
|
847 | 894 |
|
848 | 895 |
|
|
||
362 | 362 |
|
363 | 363 |
|
364 | 364 |
|
365 |
|
|
366 |
|
|
367 |
|
|
368 |
|
|
369 |
|
|
370 |
|
|
371 |
|
|
372 |
|
|
373 |
|
|
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
|
|
379 |
|
|
365 | 380 |
|
|
||
61 | 61 |
|
62 | 62 |
|
63 | 63 |
|
64 |
|
|
65 |
|
|
66 |
|
|
64 | 67 |
|
65 | 68 |
|
66 | 69 |
|
|
||
479 | 479 |
|
480 | 480 |
|
481 | 481 |
|
482 |
|
|
483 |
|
|
482 | 484 |
|
483 | 485 |
|
484 | 486 |
|
|
||
527 | 529 |
|
528 | 530 |
|
529 | 531 |
|
532 |
|
|
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
|
537 |
|
|
530 | 538 |
|
531 | 539 |
|
532 | 540 |
|
|
||
609 | 617 |
|
610 | 618 |
|
611 | 619 |
|
620 |
|
|
621 |
|
|
622 |
|
|
623 |
|
|
624 |
|
|
625 |
|
|
626 |
|
|
627 |
|
|
628 |
|
|
629 |
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
612 | 637 |
|
613 | 638 |
|
614 | 639 |
|
|
||
629 | 654 |
|
630 | 655 |
|
631 | 656 |
|
657 |
|
|
632 | 658 |
|
633 | 659 |
|
634 | 660 |
|
|
||
50 | 50 |
|
51 | 51 |
|
52 | 52 |
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
53 | 63 |
|
54 | 64 |
|
55 | 65 |
|
|
||
281 | 291 |
|
282 | 292 |
|
283 | 293 |
|
284 |
|
|
294 |
|
|
285 | 295 |
|
286 | 296 |
|
287 | 297 |
|
288 | 298 |
|
289 |
|
|
299 |
|
|
290 | 300 |
|
291 | 301 |
|
292 | 302 |
|
|
||
347 | 357 |
|
348 | 358 |
|
349 | 359 |
|
360 |
|
|
361 |
|
|
362 |
|
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
|
|
368 |
|
|
350 | 369 |
|
351 | 370 |
|
352 | 371 |
|
|
||
530 | 549 |
|
531 | 550 |
|
532 | 551 |
|
533 |
|
|
534 |
|
|
552 |
|
|
535 | 553 |
|
536 | 554 |
|
537 | 555 |
|
|
||
1187 | 1205 |
|
1188 | 1206 |
|
1189 | 1207 |
|
1208 |
|
|
1209 |
|
|
1190 | 1210 |
|
1191 | 1211 |
|
1192 | 1212 |
|
|
||
1201 | 1221 |
|
1202 | 1222 |
|
1203 | 1223 |
|
1224 |
|
|
1204 | 1225 |
|
1205 | 1226 |
|
1206 | 1227 |
|
|
||
1244 | 1265 |
|
1245 | 1266 |
|
1246 | 1267 |
|
1268 |
|
|
1269 |
|
|
1270 |
|
|
1271 |
|
|
1272 |
|
|
1273 |
|
|
1274 |
|
|
1275 |
|
|
1276 |
|
|
1277 |
|
|
1278 |
|
|
1279 |
|
|
1280 |
|
|
1281 |
|
|
1282 |
|
|
1283 |
|
|
1284 |
|
|
1285 |
|
|
1286 |
|
|
1287 |
|
|
1288 |
|
|
1289 |
|
|
1290 |
|
|
1291 |
|
|
1292 |
|
|
1293 |
|
|
1294 |
|
|
1295 |
|
|
1296 |
|
|
1297 |
|
|
1298 |
|
|
1299 |
|
|
1300 |
|
|
1301 |
|
|
1302 |
|
|
1303 |
|
|
1304 |
|
|
1305 |
|
|
1306 |
|
|
1307 |
|
|
1308 |
|
|
1309 |
|
|
1310 |
|
|
1311 |
|
|
1312 |
|
|
1313 |
|
|
1314 |
|
|
1315 |
|
|
1316 |
|
|
1317 |
|
|
1318 |
|
|
1319 |
|
|
1320 |
|
|
1321 |
|
|
1322 |
|
|
1323 |
|
|
1324 |
|
|
1325 |
|
|
1326 |
|
|
1327 |
|
|
1328 |
|
|
1329 |
|
|
1330 |
|
|
1331 |
|
|
1332 |
|
|
1333 |
|
|
1334 |
|
|
1335 |
|
|
1336 |
|
|
1337 |
|
|
1338 |
|
|
1247 | 1339 |
|
1248 | 1340 |
|
1249 | 1341 |
|
|
||
1330 | 1422 |
|
1331 | 1423 |
|
1332 | 1424 |
|
1425 |
|
|
1426 |
|
|
1427 |
|
|
1428 |
|
|
1429 |
|
|
1430 |
|
|
1431 |
|
|
1432 |
|
|
1433 |
|
|
1434 |
|
|
1435 |
|
|
1436 |
|
|
1437 |
|
|
1438 |
|
|
1439 |
|
|
1440 |
|
|
1441 |
|
|
1442 |
|
|
1443 |
|
|
1444 |
|
|
1445 |
|
|
1446 |
|
|
1447 |
|
|
1448 |
|
|
1449 |
|
|
1450 |
|
|
1451 |
|
|
1452 |
|
|
1453 |
|
|
1454 |
|
|
1455 |
|
|
1456 |
|
|
1457 |
|
|
1333 | 1458 |
|
1334 | 1459 |
|
1335 | 1460 |
|