x86/mm: Combine {destroy,replace}_grant_{pte,va}_mapping()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Aug 2017 15:39:59 +0000 (16:39 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Sep 2017 10:22:22 +0000 (11:22 +0100)
commit34840c9792b9d73867007bd77cb60299428d841e
treea72db7a854798acc663c9c5de1913f9a0f6daf28
parente9782b513c8a07aa11bdf7c10f625b27f18b6fca
x86/mm: Combine {destroy,replace}_grant_{pte,va}_mapping()

As with the create side of things, these are largely identical.  Most cases
are actually destroying the mapping rather than replacing it with a stolen
entry.

Reimplement their logic in replace_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