Commit f9c9987
committed
x86/smp: Use dedicated cache-line for mwait_play_dead()
Monitoring idletask::thread_info::flags in mwait_play_dead() has been an
obvious choice as all what is needed is a cache line which is not written
by other CPUs.
But there is a use case where a "dead" CPU needs to be brought out of
MWAIT: kexec().
This is required as kexec() can overwrite text, pagetables, stacks and the
monitored cacheline of the original kernel. The latter causes MWAIT to
resume execution which obviously causes havoc on the kexec kernel which
results usually in triple faults.
Use a dedicated per CPU storage to prepare for that.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230615193330.434553750@linutronix.de1 parent 2affa6d commit f9c9987
1 file changed
+14
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
| |||
1758 | 1769 | | |
1759 | 1770 | | |
1760 | 1771 | | |
| 1772 | + | |
1761 | 1773 | | |
1762 | 1774 | | |
1763 | 1775 | | |
1764 | | - | |
1765 | 1776 | | |
1766 | 1777 | | |
1767 | 1778 | | |
| |||
1796 | 1807 | | |
1797 | 1808 | | |
1798 | 1809 | | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | 1810 | | |
1807 | 1811 | | |
1808 | 1812 | | |
| |||
1814 | 1818 | | |
1815 | 1819 | | |
1816 | 1820 | | |
1817 | | - | |
| 1821 | + | |
1818 | 1822 | | |
1819 | | - | |
| 1823 | + | |
1820 | 1824 | | |
1821 | 1825 | | |
1822 | 1826 | | |
| |||
0 commit comments