x86: don't override INVALID_M2P_ENTRY with SHARED_M2P_ENTRY
authorJan Beulich <jbeulich@suse.com>
Fri, 11 Sep 2020 12:14:43 +0000 (14:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 11 Sep 2020 12:14:43 +0000 (14:14 +0200)
commitc9476c4ad72e8a1842d713c74843034c7ec6eb51
tree89d41a7a29d61a62962453ab97dc2252a2a1b06f
parent899316e02e0d1c9bfe65cca1b20f8140ee9c4d17
x86: don't override INVALID_M2P_ENTRY with SHARED_M2P_ENTRY

While in most cases code ahead of the invocation of set_gpfn_from_mfn()
deals with shared pages, at least in set_typed_p2m_entry() I can't spot
such handling (it's entirely possible there's code missing there). Let's
try to play safe and add an extra check.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/mm.c