x86/xen: fix pv boot
authorJuergen Gross <jgross@suse.com>
Wed, 7 Nov 2018 17:01:00 +0000 (18:01 +0100)
committerJuergen Gross <jgross@suse.com>
Fri, 9 Nov 2018 07:16:55 +0000 (08:16 +0100)
commit1457d8cf7664f34c4ba534c1073821a559a2f6f9
treecb6435f561fe83789ecd108c5812e1e5667ae900
parent6cc4a0863c9709c512280c64e698d68443ac8053
x86/xen: fix pv boot

Commit 9da3f2b7405440 ("x86/fault: BUG() when uaccess helpers fault on
kernel addresses") introduced a regression for booting Xen PV guests.

Xen PV guests are using __put_user() and __get_user() for accessing the
p2m map (physical to machine frame number map) as accesses might fail
in case of not populated areas of the map.

With above commit using __put_user() and __get_user() for accessing
kernel pages is no longer valid. So replace the Xen hack by adding
appropriate p2m access functions using the default fixup handler.

Fixes: 9da3f2b7405440 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/include/asm/xen/page.h
arch/x86/xen/p2m.c