x86/P2M: introduce p2m_{add,remove}_page()
authorJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2022 06:29:33 +0000 (08:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2022 06:29:33 +0000 (08:29 +0200)
commitfa4b4fa61debfde019e3e145e39706c4652d1c32
tree073eafc37b3edbbf5f7991a8a8dc92a5e779f57a
parent0cd09bf30514f20d15956aa22dda370a4cf59b2e
x86/P2M: introduce p2m_{add,remove}_page()

Rename guest_physmap_add_entry() to p2m_add_page(); make
guest_physmap_remove_page() a trivial wrapper around p2m_remove_page().
This way callers can use suitable pairs of functions (previously
violated by hvm/grant_table.c).

In HVM-specific code further avoid going through the guest_physmap_*()
layer, and instead use the two new/renamed functions directly.

Ultimately the goal is to have guest_physmap_...() functions cover all
types of guests, but p2m_...() dealing only with translated ones.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/hvm/grant_table.c
xen/arch/x86/hvm/ioreq.c
xen/arch/x86/include/asm/p2m.h
xen/arch/x86/mm/p2m.c