• Juergen Gross's avatar
    x86/xen: fix pv boot · 1457d8cf
    Juergen Gross authored
    Commit 9da3f2b7 ("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: 9da3f2b7 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses")
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    Reviewed-by: default avatarAndrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    1457d8cf
p2m.c 21.6 KB