forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commitbb8c13d
x86/microcode: Fix CPU synchronization routine
Emanuel reported an issue with a hang during microcode update because mydumb idea to use one atomic synchronization variable for both rendezvous- before and after update - was simply bollocks: microcode: microcode_reload_late: late_cpus: 4 microcode: __reload_late: cpu 2 entered microcode: __reload_late: cpu 1 entered microcode: __reload_late: cpu 3 entered microcode: __reload_late: cpu 0 entered microcode: __reload_late: cpu 1 left microcode: Timeout while waiting for CPUs rendezvous, remaining: 1CPU1 above would finish, leave and the others will still spin waiting forit to join.So do two synchronization atomics instead, which makes the code a lot morestraightforward.Also, since the update is serialized and it also takes quite some time permicrocode engine, increase the exit timeout by the number of CPUs on thesystem.That's ok because the moment all CPUs are done, that timeout will be cutshort.Furthermore, panic when some of the CPUs timeout when returning from amicrocode update: we can't allow a system with not all cores updated.Also, as an optimization, do not do the exit sync if microcode wasn'tupdated.Reported-by: Emanuel Czirai <xftroxgpx@protonmail.com>Signed-off-by: Borislav Petkov <bp@suse.de>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Tested-by: Emanuel Czirai <xftroxgpx@protonmail.com>Tested-by: Ashok Raj <ashok.raj@intel.com>Tested-by: Tom Lendacky <thomas.lendacky@amd.com>Link:https://lkml.kernel.org/r/20180314183615.17629-2-bp@alien8.de1 parent2613f36 commitbb8c13d
1 file changed
+41
-27
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
517 | 517 |
| |
518 | 518 |
| |
519 | 519 |
| |
520 |
| - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
521 | 543 |
| |
522 | 544 |
| |
523 | 545 |
| |
| |||
527 | 549 |
| |
528 | 550 |
| |
529 | 551 |
| |
530 |
| - | |
531 |
| - | |
532 | 552 |
| |
533 | 553 |
| |
534 | 554 |
| |
535 | 555 |
| |
536 |
| - | |
537 |
| - | |
538 | 556 |
| |
539 | 557 |
| |
540 | 558 |
| |
541 | 559 |
| |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 |
| - | |
548 |
| - | |
549 |
| - | |
550 |
| - | |
551 |
| - | |
552 |
| - | |
553 |
| - | |
| 560 | + | |
| 561 | + | |
554 | 562 |
| |
555 | 563 |
| |
556 | 564 |
| |
557 | 565 |
| |
558 | 566 |
| |
559 | 567 |
| |
560 | 568 |
| |
561 |
| - | |
562 |
| - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
563 | 572 |
| |
| 573 | + | |
| 574 | + | |
564 | 575 |
| |
565 | 576 |
| |
566 |
| - | |
567 |
| - | |
568 |
| - | |
569 |
| - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
570 | 585 |
| |
571 | 586 |
| |
572 | 587 |
| |
| |||
579 | 594 |
| |
580 | 595 |
| |
581 | 596 |
| |
582 |
| - | |
| 597 | + | |
| 598 | + | |
583 | 599 |
| |
584 | 600 |
| |
585 |
| - | |
586 |
| - | |
587 |
| - | |
| 601 | + | |
588 | 602 |
| |
589 | 603 |
| |
590 | 604 |
| |
|
0 commit comments
Comments
(0)