x86/p2m: introduce p2m_is_special()
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 12:17:07 +0000 (14:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 12:17:07 +0000 (14:17 +0200)
commit0bf755e2c856628e11e93c76c3e12974e9964638
treeb88c46e41e590d73177bb5edba3e7863e93e9a04
parent8ea80530cd0dbb8ffa7ac92606a3ee29663fdc93
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>
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/p2m.h