Michael Ellerman
9583922563
powerpc: Fix is_kvm_guest() / kvm_para_available()
...
Commit a21d1becaa ("powerpc: Reintroduce is_kvm_guest() as a fast-path
check") added is_kvm_guest() and changed kvm_para_available() to use it.
is_kvm_guest() checks a static key, kvm_guest, and that static key is
set in check_kvm_guest().
The problem is check_kvm_guest() is only called on pseries, and even
then only in some configurations. That means is_kvm_guest() always
returns false on all non-pseries and some pseries depending on
configuration. That's a bug.
For PR KVM guests this is noticable because they no longer do live
patching of themselves, which can be detected by the omission of a
message in dmesg such as:
KVM: Live patching for a fast VM worked
To fix it make check_kvm_guest() an initcall, to ensure it's always
called at boot. It needs to be core so that it runs before
kvm_guest_init() which is postcore. To be an initcall it needs to return
int, where 0 means success, so update that.
We still call it manually in pSeries_smp_probe(), because that runs
before init calls are run.
Fixes: a21d1becaa ("powerpc: Reintroduce is_kvm_guest() as a fast-path check")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Link: https://lore.kernel.org/r/20210623130514.2543232-1-mpe@ellerman.id.au
2021-06-25 14:47:19 +10:00
..
2021-06-25 00:06:55 +10:00
2021-05-01 18:50:44 -07:00
2021-06-17 00:09:00 +10:00
2021-04-30 12:22:28 -07:00
2021-04-14 23:04:44 +10:00
2020-03-25 11:50:48 +01:00
2021-04-21 22:52:33 +10:00
2021-06-25 00:06:56 +10:00
2020-10-25 14:51:49 -07:00
2020-12-11 00:10:25 +11:00
2020-06-02 20:59:11 +10:00
2020-12-05 21:49:18 +11:00
2020-12-04 01:01:29 +11:00
2021-01-29 10:05:51 +05:30
2021-06-17 00:09:00 +10:00
2020-07-26 23:34:19 +10:00
2021-02-09 00:10:49 +11:00
2020-11-27 10:33:42 +01:00
2021-01-29 10:05:51 +05:30
2019-11-13 19:27:40 +11:00
2020-11-02 12:54:20 +11:00
2020-08-07 18:48:15 -07:00
2019-09-14 00:01:14 +10:00
2020-10-07 22:34:47 +11:00
2020-07-26 23:34:20 +10:00
2021-05-28 22:54:27 +10:00
2021-06-25 00:07:10 +10:00
2021-06-25 00:06:55 +10:00
2021-06-17 00:09:00 +10:00
2021-06-25 00:06:56 +10:00
2021-06-25 00:06:56 +10:00
2021-04-22 20:59:04 +10:00
2021-06-25 14:47:19 +10:00
2021-06-25 00:06:55 +10:00
2019-11-13 19:27:40 +11:00
2021-06-17 00:09:10 +10:00
2021-06-25 00:07:10 +10:00
2021-06-17 00:09:10 +10:00
2021-06-17 00:09:10 +10:00
2021-06-25 00:06:55 +10:00
2021-06-25 00:07:10 +10:00
2021-06-25 00:07:11 +10:00
2021-06-17 00:09:10 +10:00
2021-04-03 21:21:41 +11:00
2021-06-25 00:06:55 +10:00
2021-03-29 13:22:10 +11:00
2021-04-08 21:17:45 +10:00
2021-03-29 13:22:10 +11:00
2020-11-24 16:47:35 +01:00
2020-05-07 17:25:54 +10:00
2021-06-25 00:06:56 +10:00
2021-06-25 00:06:57 +10:00
2021-05-28 22:54:27 +10:00
2020-12-04 01:01:09 +11:00
2021-06-01 11:17:08 +10:00
2021-06-25 00:06:56 +10:00
2021-04-30 11:20:40 -07:00
2021-06-17 00:09:00 +10:00
2021-06-25 00:06:55 +10:00
2021-06-25 00:06:55 +10:00
2021-06-25 14:47:18 +10:00
2019-09-14 00:04:40 +10:00
2019-09-14 00:04:40 +10:00
2020-10-08 21:17:13 +11:00
2021-05-12 11:07:39 +10:00
2021-04-02 00:18:09 +11:00
2021-06-21 21:13:19 +10:00
2021-06-25 00:06:55 +10:00
2021-06-17 00:09:10 +10:00
2021-03-29 13:22:17 +11:00
2020-06-02 20:59:11 +10:00
2021-06-16 00:16:48 +10:00
2021-06-16 00:16:48 +10:00
2021-06-21 21:13:20 +10:00
2019-08-30 09:40:15 +10:00
2021-03-08 11:43:27 +01:00
2020-07-26 23:34:19 +10:00
2021-04-21 22:52:32 +10:00
2021-06-25 14:46:51 +10:00
2021-05-17 15:27:15 +10:00
2019-08-22 23:11:48 +10:00
2021-04-30 11:20:40 -07:00
2021-02-09 00:01:05 +11:00
2020-01-06 16:25:29 +11:00
2021-02-03 09:46:36 +11:00
2020-05-18 21:58:44 +10:00
2020-04-04 21:40:57 +11:00
2020-02-04 03:05:26 +00:00
2021-06-25 00:07:11 +10:00
2019-10-29 15:12:17 +11:00
2021-06-25 14:47:19 +10:00
2021-06-25 00:07:10 +10:00
2020-02-04 03:05:26 +00:00
2020-06-09 09:39:13 -07:00
2021-04-14 23:04:16 +10:00
2021-06-25 00:06:55 +10:00
2020-07-16 13:12:38 +10:00
2020-07-16 14:49:53 +10:00
2021-06-21 21:13:19 +10:00
2019-11-13 00:33:22 +11:00
2019-11-13 00:33:22 +11:00
2021-06-17 00:09:00 +10:00
2021-06-25 00:07:09 +10:00
2021-06-25 00:07:10 +10:00
2021-02-09 00:10:50 +11:00
2021-06-25 00:06:55 +10:00
2021-06-25 00:06:55 +10:00
2021-06-25 00:06:55 +10:00
2021-05-12 11:07:39 +10:00
2021-06-25 00:07:09 +10:00
2021-06-17 00:09:11 +10:00
2020-06-02 20:59:11 +10:00
2021-02-11 23:35:07 +11:00
2021-06-25 00:06:55 +10:00
2020-09-18 20:05:24 +10:00
2021-04-14 23:04:16 +10:00
2021-06-15 23:47:10 +10:00
2021-06-25 00:07:09 +10:00
2020-10-06 23:22:25 +11:00
2021-06-25 00:06:55 +10:00
2019-08-30 09:40:15 +10:00
2021-06-21 21:16:31 +10:00
2019-10-11 19:33:25 +11:00
2021-06-25 00:06:55 +10:00
2021-01-30 22:23:42 +11:00
2021-01-30 22:23:42 +11:00
2021-04-14 23:04:44 +10:00
2020-05-19 00:10:37 +10:00
2021-06-25 00:06:55 +10:00
2021-06-25 00:06:56 +10:00
2021-06-17 00:09:12 +10:00