Peter Zijlstra
864bcaa38e
x86/cpu/kvm: Provide UNTRAIN_RET_VM
...
Similar to how it doesn't make sense to have UNTRAIN_RET have two
untrain calls, it also doesn't make sense for VMEXIT to have an extra
IBPB call.
This cures VMEXIT doing potentially unret+IBPB or double IBPB.
Also, the (SEV) VMEXIT case seems to have been overlooked.
Redefine the meaning of the synthetic IBPB flags to:
- ENTRY_IBPB -- issue IBPB on entry (was: entry + VMEXIT)
- IBPB_ON_VMEXIT -- issue IBPB on VMEXIT
And have 'retbleed=ibpb' set *BOTH* feature flags to ensure it retains
the previous behaviour and issues IBPB on entry+VMEXIT.
The new 'srso=ibpb_vmexit' option only sets IBPB_ON_VMEXIT.
Create UNTRAIN_RET_VM specifically for the VMEXIT case, and have that
check IBPB_ON_VMEXIT.
All this avoids having the VMEXIT case having to check both ENTRY_IBPB
and IBPB_ON_VMEXIT and simplifies the alternatives.
Fixes: fb3bd914b3 ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://lore.kernel.org/r/20230814121149.109557833@infradead.org
2023-08-16 21:58:59 +02:00
..
2022-06-17 14:24:14 -05:00
2023-06-26 13:39:10 -07:00
2023-06-26 16:32:47 -07:00
2021-10-20 22:35:04 +02:00
2023-05-31 09:34:59 -07:00
2023-06-05 21:11:07 +02:00
2023-03-17 10:45:49 -07:00
2022-04-07 08:27:54 -07:00
2023-08-09 21:18:46 +02:00
2022-08-04 11:11:59 +02:00
2023-02-13 22:13:12 +01:00
2023-07-10 09:52:23 +02:00
2022-03-02 11:42:36 +01:00
2022-04-05 19:22:27 +02:00
2022-09-29 12:20:54 +02:00
2023-05-15 13:45:04 +02:00
2023-05-22 14:06:33 +02:00
2018-07-16 17:59:57 +02:00
2019-05-13 11:07:33 +02:00
2022-07-25 13:26:14 +02:00
2023-01-13 13:43:20 +01:00
2022-04-07 11:27:02 +02:00
2023-06-05 09:57:24 +02:00
2023-06-05 09:57:24 +02:00
2023-06-05 09:57:24 +02:00
2020-05-19 18:03:07 +02:00
2021-12-09 16:42:28 -08:00
2017-11-02 11:10:55 +01:00
2022-09-20 15:35:37 +02:00
2020-07-31 11:49:09 +02:00
2023-03-30 12:58:51 -06:00
2022-05-23 18:42:07 -07:00
2023-06-16 10:15:59 +02:00
2020-10-25 14:51:49 -07:00
2020-06-08 11:05:57 -07:00
2022-11-10 13:12:45 +01:00
2017-11-02 11:10:55 +01:00
2022-09-26 10:13:16 -07:00
2020-08-20 15:45:18 -04:00
2023-01-27 11:19:46 +00:00
2022-10-03 14:03:24 -07:00
2020-03-21 15:23:54 +01:00
2017-11-02 11:10:55 +01:00
2023-06-05 09:36:39 +02:00
2023-06-05 09:57:17 +02:00
2023-06-05 09:36:39 +02:00
2023-05-09 12:53:16 +02:00
2022-05-31 14:10:54 -07:00
2020-05-07 13:48:05 +02:00
2022-12-15 10:37:26 -08:00
2023-06-26 14:45:53 -07:00
2023-05-15 20:03:08 +02:00
2023-08-09 07:55:00 -07:00
2022-11-29 20:41:24 +01:00
2019-09-03 09:36:36 +02:00
2023-05-15 13:44:52 +02:00
2021-06-07 12:14:45 +02:00
2022-10-17 16:41:15 +02:00
2023-02-21 14:51:40 -08:00
2020-05-07 16:06:20 +02:00
2020-09-07 22:44:43 +02:00
2021-07-02 12:08:10 -07:00
2020-06-30 11:59:48 +02:00
2023-03-16 13:08:39 -07:00
2020-06-15 14:10:00 +02:00
2023-02-15 12:35:20 +01:00
2022-07-22 17:24:47 -05:00
2018-08-05 09:53:13 +02:00
2023-05-18 11:56:18 -07:00
2020-04-09 00:01:59 +09:00
2017-11-02 11:10:55 +01:00
2023-06-06 16:58:23 +02:00
2022-12-12 18:18:34 -08:00
2021-01-06 08:40:56 -05:00
2017-11-02 11:10:55 +01:00
2019-10-17 21:31:57 +02:00
2020-11-18 18:02:50 +01:00
2023-08-14 11:02:50 +02:00
2017-12-22 20:13:05 +01:00
2022-08-16 11:03:38 -07:00
2022-05-27 12:34:45 +02:00
2023-04-26 15:07:57 +02:00
2021-02-09 15:28:37 +01:00
2021-04-20 08:59:03 -06:00
2020-09-18 09:59:40 +02:00
2020-08-24 18:18:32 +02:00
2023-06-30 10:33:17 -07:00
2021-12-11 09:09:47 +01:00
2022-04-18 07:21:10 +02:00
2021-10-28 23:25:26 +02:00
2019-05-30 11:29:53 -07:00
2023-01-13 10:07:27 +01:00
2022-10-17 16:41:05 +02:00
2022-04-13 12:15:50 -07:00
2020-10-28 20:26:25 +01:00
2020-06-03 20:09:46 -07:00
2022-08-30 10:56:22 +02:00
2020-11-18 20:55:59 +01:00
2022-11-17 13:58:32 +01:00
2023-04-18 17:29:51 +00:00
2019-07-17 08:09:59 +02:00
2021-08-10 23:31:43 +02:00
2017-11-02 11:10:55 +01:00
2021-10-05 21:48:30 +02:00
2023-07-10 09:52:23 +02:00
2023-01-24 10:36:40 -08:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:35 -07:00
2021-03-15 11:00:57 +01:00
2017-11-02 11:10:55 +01:00
2023-01-03 18:46:06 +01:00
2022-01-23 20:38:01 +01:00
2020-11-26 12:58:56 +01:00
2022-02-02 13:11:43 +01:00
2021-03-18 15:31:53 +01:00
2022-02-15 17:47:11 +01:00
2017-11-02 11:10:55 +01:00
2021-02-15 20:10:30 +01:00
2020-04-24 11:18:44 +01:00
2023-04-05 13:36:26 +02:00
2023-03-22 11:08:40 -07:00
2020-05-12 16:05:30 +02:00
2020-10-28 20:26:28 +01:00
2020-07-18 12:31:49 +02:00
2022-06-28 13:20:21 +02:00
2020-11-06 23:14:58 +01:00
2022-10-21 10:49:35 +02:00
2020-07-18 07:17:16 +02:00
2022-12-05 22:22:33 +01:00
2022-10-17 16:41:05 +02:00
2021-05-21 12:36:44 +02:00
2020-06-11 15:15:14 +02:00
2023-06-09 17:44:16 -07:00
2022-11-17 15:15:22 +01:00
2023-01-13 11:48:15 +01:00
2019-05-24 17:39:02 +02:00
2018-04-23 10:17:28 +02:00
2022-04-22 12:32:04 +02:00
2022-12-15 10:37:26 -08:00
2020-06-09 09:39:13 -07:00
2017-11-02 11:10:55 +01:00
2023-06-16 17:17:42 +02:00
2020-07-22 23:56:53 +02:00
2018-04-13 17:10:27 -07:00
2023-04-08 13:45:38 -07:00
2021-07-30 17:09:01 +02:00
2017-11-02 11:10:55 +01:00
2022-10-03 14:03:26 -07:00
2022-09-26 13:20:52 -04:00
2023-07-29 11:05:31 -04:00
2021-12-08 04:24:43 -05:00
2022-04-07 08:27:52 -07:00
2020-07-09 13:29:42 -04:00
2019-02-20 22:47:38 +01:00
2023-07-29 11:05:31 -04:00
2023-06-06 17:31:44 -07:00
2023-01-31 15:01:47 +01:00
2023-08-08 23:13:17 +02:00
2023-04-29 09:09:16 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2022-08-14 11:24:29 +02:00
2023-05-18 11:56:18 -07:00
2023-06-16 22:23:27 +02:00
2022-11-10 13:12:45 +01:00
2023-07-17 15:48:10 +02:00
2022-11-19 11:12:06 +01:00
2023-07-17 15:48:10 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2023-04-28 09:43:49 -07:00
2023-03-16 13:08:40 -07:00
2020-05-28 18:34:30 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-04-23 10:50:26 +09:00
2018-01-14 21:11:54 +01:00
2020-09-16 16:52:28 +02:00
2023-08-04 17:16:14 -07:00
2022-12-05 22:22:34 +01:00
2023-08-07 17:03:54 -07:00
2017-11-02 11:10:55 +01:00
2022-04-06 12:59:17 +02:00
2023-06-01 15:04:33 +02:00
2023-01-13 11:48:16 +01:00
2022-05-17 09:25:25 +02:00
2023-05-31 10:21:21 +02:00
2023-08-16 21:58:59 +02:00
2017-11-02 11:10:55 +01:00
2020-10-14 11:42:04 -07:00
2017-11-02 11:10:55 +01:00
2019-05-20 17:27:08 +03:00
2023-06-16 17:17:42 +02:00
2019-05-21 11:28:45 +02:00
2023-03-23 23:18:58 +01:00
2020-10-29 21:54:35 +01:00
2023-02-09 16:51:41 -08:00
2023-03-30 12:58:51 -06:00
2023-02-09 16:51:41 -08:00
2022-12-15 10:37:27 -08:00
2023-02-02 22:33:18 -08:00
2022-02-23 10:58:28 +01:00
2023-03-17 13:29:47 +01:00
2023-03-06 09:41:37 +01:00
2017-11-02 11:10:55 +01:00
2021-08-10 23:31:43 +02:00
2022-06-17 14:24:14 -05:00
2018-06-29 20:06:07 -05:00
2017-11-02 11:10:55 +01:00
2022-12-05 22:22:33 +01:00
2023-06-05 09:36:39 +02:00
2017-11-02 11:10:55 +01:00
2023-06-27 14:43:02 -07:00
2021-07-01 11:06:03 -07:00
2019-12-10 10:12:55 +01:00
2019-12-10 10:12:55 +01:00
2022-11-08 17:37:18 -08:00
2023-03-30 12:58:51 -06:00
2023-05-08 15:25:24 +02:00
2022-12-15 10:37:26 -08:00
2023-05-17 09:24:49 +02:00
2020-06-02 10:59:11 -07:00
2023-02-02 22:33:10 -08:00
2022-12-15 10:37:27 -08:00
2023-02-02 22:33:10 -08:00
2018-08-17 10:27:36 -07:00
2023-05-17 09:24:49 +02:00
2022-04-04 15:58:24 -07:00
2021-12-19 22:44:34 +01:00
2021-02-15 20:09:46 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2022-10-17 16:41:04 +02:00
2017-11-02 11:10:55 +01:00
2021-08-10 23:31:43 +02:00
2023-03-16 13:08:39 -07:00
2023-08-12 09:18:47 -07:00
2019-05-30 11:26:32 -07:00
2022-05-23 18:17:09 -07:00
2019-10-01 20:31:35 +02:00
2022-05-19 10:56:46 +02:00
2019-11-14 18:24:43 +01:00
2017-11-02 11:10:55 +01:00
2023-01-31 15:01:47 +01:00
2017-11-02 11:10:55 +01:00
2022-11-24 13:56:44 +01:00
2021-12-09 16:42:28 -08:00
2023-05-15 13:45:03 +02:00
2017-11-02 11:10:55 +01:00
2023-04-14 17:31:26 +02:00
2023-01-25 12:33:06 +01:00
2023-03-08 11:48:11 -08:00
2022-08-21 10:06:28 -07:00
2020-11-20 11:16:34 -08:00
2020-03-19 11:58:13 +01:00
2023-08-08 09:31:43 +02:00
2017-11-02 11:10:55 +01:00
2022-12-15 10:37:27 -08:00
2023-04-14 17:31:24 +02:00
2023-06-06 18:28:25 +02:00
2023-06-27 13:26:30 -07:00
2022-11-04 15:33:30 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2023-06-16 10:16:00 +02:00
2022-10-19 09:58:49 +02:00
2022-10-19 09:58:48 +02:00
2017-11-02 11:10:55 +01:00
2022-04-04 10:16:57 +02:00
2023-06-26 14:45:53 -07:00
2021-02-10 23:34:17 +01:00
2022-10-03 14:03:17 -07:00
2022-11-09 12:26:51 -05:00
2023-02-21 14:51:40 -08:00
2020-05-28 21:18:40 +02:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2022-11-18 02:18:10 +01:00
2021-09-21 13:57:43 +02:00
2022-06-29 17:43:41 +02:00
2021-12-11 09:09:45 +01:00
2023-03-28 16:20:11 -07:00
2017-11-02 11:10:55 +01:00
2022-04-27 13:55:19 +02:00
2022-04-27 13:55:19 +02:00
2018-10-03 11:56:34 +02:00
2023-04-04 11:08:12 -07:00
2023-07-10 09:52:25 +02:00
2019-04-10 09:53:31 +02:00
2020-12-09 09:37:42 +01:00
2022-10-24 17:57:28 +02:00
2023-05-18 11:56:18 -07:00
2020-03-21 16:03:25 +01:00
2023-06-06 18:25:57 +02:00
2023-01-31 15:05:30 +01:00
2021-05-31 22:32:26 +02:00
2023-06-09 17:44:16 -07:00
2023-06-09 17:44:16 -07:00
2017-11-13 19:07:38 -08:00
2022-05-13 23:59:23 +02:00
2022-07-21 10:50:13 -07:00
2017-11-02 11:10:55 +01:00
2023-06-16 10:50:16 +02:00
2023-05-15 13:45:02 +02:00
2017-11-02 11:10:55 +01:00
2020-11-17 14:36:13 +01:00
2020-09-07 19:45:25 +02:00
2022-05-03 11:18:59 +02:00
2023-06-28 10:59:38 -07:00
2023-05-03 10:37:22 -07:00
2023-05-03 10:37:22 -07:00
2023-05-03 10:37:22 -07:00
2019-11-07 11:07:29 +01:00
2023-06-06 18:31:37 +02:00
2022-04-26 13:35:45 -07:00
2023-06-07 10:03:12 -07:00
2022-03-28 19:38:51 -07:00
2019-05-30 11:26:35 -07:00
2017-11-02 11:10:55 +01:00
2022-01-30 21:17:00 -05:00
2022-01-30 21:17:00 -05:00
2017-11-02 11:10:55 +01:00
2023-01-25 12:33:40 +01:00
2020-04-23 10:50:26 +09:00
2017-11-02 11:10:55 +01:00
2020-03-23 18:45:14 +01:00
2023-01-24 10:05:21 -08:00
2021-01-21 20:08:53 +01:00
2021-04-30 11:20:40 -07:00
2019-10-22 00:51:44 +02:00
2023-05-19 13:56:25 -04:00
2022-06-08 05:56:24 -04:00
2019-06-28 00:04:39 +02:00
2020-01-14 12:20:58 +01:00
2022-08-16 11:03:38 -07:00
2023-06-26 16:32:47 -07:00
2022-02-11 20:39:39 +11:00
2017-11-02 11:10:55 +01:00
2022-02-11 20:39:39 +11:00
2022-02-11 20:39:39 +11:00