x86/mm: free_page_type() is PV-only
authorJan Beulich <jbeulich@suse.com>
Mon, 13 May 2019 14:42:34 +0000 (16:42 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 May 2019 14:42:34 +0000 (16:42 +0200)
commit738faba9d74736dc8e5d7c5d3be53776097f6af1
tree6bb140d74be06518e768104bf30e997f5f2da6ea
parent6fafb8befa99620a2d7323b9eca5c387bad1f59f
x86/mm: free_page_type() is PV-only

While it already has a CONFIG_PV wrapped around its entire body, it is
still uselessly invoking mfn_to_gmfn(), which is about to be replaced.
Avoid morphing this code into even more suspicious shape and remove the
effectively dead code - translated mode has been made impossible for PV
quite some time ago.

Adjust and extend the assertions at the same time: The original
ASSERT(!shadow_mode_refcounts(owner)) really means
ASSERT(!shadow_mode_enabled(owner) || !paging_mode_refcounts(owner)),
which isn't what we want here.

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