x86/p2m: introduce p2m_is_special()
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 13:06:35 +0000 (15:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 13:06:35 +0000 (15:06 +0200)
commit968526568c5519e32298b5cef8f05a6caee5f721
tree3e0d75896f0261768b0ba96f874df72a63f04fdc
parente4c23845c24718fa17a591e52bc13ae7f80b2125
x86/p2m: introduce p2m_is_special()

Seeing the similarity of grant, foreign, and (subsequently) direct-MMIO
handling, introduce a new P2M type group named "special" (as in "needing
special accessors to create/destroy").

Also use -EPERM instead of other error codes on the two domain_crash()
paths touched.

This is part of XSA-378.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
master commit: 0bf755e2c856628e11e93c76c3e12974e9964638
master date: 2021-08-25 14:17:07 +0200
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/p2m.h