powerpc/kvm: Fix kvm_use_magic_page
When switching from __get_user to fault_in_pages_readable, commit9f9eae5ce7
broke kvm_use_magic_page: like __get_user, fault_in_pages_readable returns 0 on success. Fixes:9f9eae5ce7
("powerpc/kvm: Prefer fault_in_pages_readable function") Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
Родитель
814a66741b
Коммит
0c8eb2884a
|
@ -669,7 +669,7 @@ static void __init kvm_use_magic_page(void)
|
|||
on_each_cpu(kvm_map_magic_page, &features, 1);
|
||||
|
||||
/* Quick self-test to see if the mapping works */
|
||||
if (!fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
|
||||
if (fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
|
||||
kvm_patching_worked = false;
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче