x86/mm: subsume set_gpfn_from_mfn() into guest_physmap_add_page()
authorJan Beulich <jbeulich@suse.com>
Tue, 14 May 2019 14:21:33 +0000 (16:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 May 2019 14:21:33 +0000 (16:21 +0200)
commit05fe88fef20bafb2b62190b08f28211a1c4a1b12
treeffa3d3403dcb19e1d44684cd0c2c1232da0debdc
parentcf7de5d9543bba1076fe8ede57b0d314394c943a
x86/mm: subsume set_gpfn_from_mfn() into guest_physmap_add_page()

The two callers in common/memory.c currently call set_gpfn_from_mfn()
themselves, so moving the call into guest_physmap_add_page() helps
tidy their code.

The two callers in common/grant_table.c fail to make that call alongside
the one to guest_physmap_add_page(), so will actually get fixed by the
change.

Other (x86) callers are HVM only and are hence unaffected by a change
to the function's !paging_mode_translate() part.

Sadly this isn't enough yet to drop Arm's dummy macro, as there's one
more use in page_alloc.c.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/p2m.c
xen/common/memory.c