Andi Kleen
919f18f961
x86/mtrr: Check if fixed MTRRs exist before saving them
...
MTRRs have an obsolete fixed variant for fine grained caching control
of the 640K-1MB region that uses separate MSRs. This fixed variant has
a separate capability bit in the MTRR capability MSR.
So far all x86 CPUs which support MTRR have this separate bit set, so it
went unnoticed that mtrr_save_state() does not check the capability bit
before accessing the fixed MTRR MSRs.
Though on a CPU that does not support the fixed MTRR capability this
results in a #GP. The #GP itself is harmless because the RDMSR fault is
handled gracefully, but results in a WARN_ON().
Add the missing capability check to prevent this.
Fixes: 2b1f6278d77c ("[PATCH] x86: Save the MTRRs of the BSP before booting an AP")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20240808000244.946864-1-ak@linux.intel.com
2024-08-08 17:03:12 +02:00
..
2024-08-07 20:04:38 +02:00
2024-05-23 21:51:50 +02:00
2024-08-08 17:03:12 +02:00
2024-06-11 18:22:41 +02:00
2024-05-17 18:29:30 -07:00
2024-07-16 13:45:43 -07:00
2024-04-25 20:55:53 -07:00
2024-06-12 11:38:58 +02:00
2023-12-01 15:00:43 -06:00
2024-02-21 19:38:03 +01:00
2022-10-17 16:41:06 +02:00
2024-01-10 10:52:28 +01:00
2023-08-30 10:11:16 +02:00
2024-04-09 18:08:11 +02:00
2023-08-17 17:07:09 +02:00
2023-12-15 16:25:55 -08:00
2023-08-05 08:31:41 +02:00
2022-04-29 14:37:59 -07:00
2022-11-25 13:01:55 -05:00
2024-06-17 17:46:02 +02:00
2024-06-24 19:11:31 +02:00
2023-05-18 11:56:18 -07:00
2022-10-17 16:41:05 +02:00
2022-10-17 16:41:05 +02:00
2024-03-27 08:45:19 +01:00
2024-06-17 17:46:08 +02:00
2022-08-29 12:19:25 +02:00
2024-05-31 16:11:29 +03:00
2024-03-26 15:22:35 +01:00
2024-01-31 22:01:51 +01:00
2024-01-31 22:03:32 +01:00
2023-10-03 10:38:07 +02:00
2023-10-03 10:38:07 +02:00
2024-05-14 00:31:44 -07:00
2023-10-18 22:15:01 +02:00
2024-03-24 05:00:36 +01:00
2024-05-13 18:21:24 -07:00
2024-05-13 18:21:24 -07:00
2024-02-25 18:53:08 +01:00
2023-01-31 20:09:26 +01:00
2023-10-27 20:36:49 +02:00
2023-08-17 17:07:09 +02:00
2024-04-30 00:54:42 +02:00
2022-10-17 16:41:05 +02:00
2024-04-25 20:55:49 -07:00
2023-08-09 12:00:55 -07:00
2024-04-30 00:54:43 +02:00
2023-10-03 10:38:07 +02:00
2024-01-31 22:03:36 +01:00
2024-07-24 20:59:29 +02:00
2024-02-15 22:07:42 +01:00
2022-06-24 09:48:55 +02:00
2022-03-09 12:49:44 +01:00
2024-03-14 17:43:30 -07:00
2023-09-24 11:00:13 +02:00
2022-03-09 12:49:44 +01:00
2024-04-09 09:48:09 +02:00
2024-02-07 17:05:21 +01:00
2024-01-10 10:52:28 +01:00
2024-06-03 17:19:03 +02:00
2024-07-11 11:55:58 +02:00
2024-05-14 00:31:44 -07:00
2024-03-23 12:41:48 +01:00
2023-08-05 08:31:42 +02:00
2023-08-09 12:00:55 -07:00
2024-03-26 10:07:59 +01:00
2024-08-07 20:04:38 +02:00
2023-07-31 17:54:27 +02:00
2023-05-18 11:56:18 -07:00
2022-06-20 18:01:16 +02:00
2024-03-26 15:22:35 +01:00
2023-10-20 11:24:22 +02:00
2024-04-24 14:30:21 +02:00
2024-06-17 17:46:20 +02:00
2021-12-01 00:06:43 +01:00
2023-08-02 15:01:51 -07:00
2023-06-05 09:57:20 +02:00
2024-06-17 17:46:20 +02:00
2022-07-09 13:12:32 +02:00
2024-06-17 17:45:50 +02:00
2022-12-10 10:33:11 -06:00
2022-03-28 19:38:51 -07:00
2024-04-03 08:24:48 -07:00
2023-12-20 10:57:51 +01:00
2024-07-31 21:46:35 +02:00
2024-03-01 12:47:37 +01:00
2024-06-12 08:44:28 +09:00
2024-03-22 09:37:09 +01:00
2024-03-22 10:17:11 +01:00
2023-12-27 11:49:56 -05:00
2024-03-14 17:43:30 -07:00
2024-04-29 10:31:30 +02:00
2022-02-25 09:36:05 +01:00
2024-01-10 10:52:29 +01:00
2024-03-04 12:01:39 +01:00
2024-04-25 20:56:28 -07:00
2022-09-26 19:46:16 -07:00
2024-06-28 14:27:22 -07:00
2023-01-12 13:06:36 +01:00
2022-05-26 22:03:52 -04:00
2024-03-11 19:53:15 -07:00
2024-04-29 10:31:34 +02:00
2024-04-29 23:27:16 +02:00
2024-06-03 11:18:51 +02:00
2022-10-03 14:03:25 -07:00
2023-09-21 08:41:23 +02:00
2024-06-12 08:44:28 +09:00
2021-12-08 12:25:37 +01:00
2022-04-14 14:09:43 +02:00
2024-02-23 17:48:22 -08:00
2024-02-23 17:48:22 -08:00
2024-06-19 12:34:34 -07:00
2024-02-15 22:07:38 +01:00
2024-06-17 17:46:02 +02:00