x86/mm: Combine create_grant_{pte,va}_mapping()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Aug 2017 15:39:59 +0000 (15:39 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Sep 2017 10:22:22 +0000 (11:22 +0100)
commite566771e6bc5b51b823723a3e60201e6d963ec62
tree052cb17d9a7e60cdd49f3a28762da867f483fa07
parentbdb897fd1ebb8f4d4bdee55eef2cda5e789ef611
x86/mm: Combine create_grant_{pte,va}_mapping()

create_grant_{pte,va}_mapping() are nearly identical; all that is really
different between them is how they convert their addr parameter to the pte to
install the grant into.

Reimplement their logic in create_grant_pv_mapping() in a mostly common way.

No (intended) change in behaviour from a guests point of view.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c