x86/mem_sharing: copy a page_lock version to be internal to memshr
authorTamas K Lengyel <tamas@tklengyel.com>
Fri, 19 Jul 2019 11:48:38 +0000 (13:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2019 11:48:38 +0000 (13:48 +0200)
commiteb6ad54731ac44f817a42d1d92e4ecd86897929e
treed2c8a57e3edb42b566698d7a1be856625612005a
parentc2c6f8b68c082caa14c49c2a02ed527e8cf0f327
x86/mem_sharing: copy a page_lock version to be internal to memshr

Patch cf4b30dca0a "Add debug code to detect illegal page_lock and put_page_type
ordering" added extra sanity checking to page_lock/page_unlock for debug builds
with the assumption that no hypervisor path ever locks two pages at once.

This assumption doesn't hold during memory sharing so we copy a version of
page_lock/unlock to be used exclusively in the memory sharing subsystem
without the sanity checks.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm/mem_sharing.c
xen/include/asm-x86/mm.h