x86/p2m: suppress audit_p2m hook when possible
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:34:14 +0000 (12:34 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:34:14 +0000 (12:34 +0100)
commit7aa7629fa0ff9a4077d2ae092d49ca6cc69bc8d3
tree90bba574af8ffeb541dd7f4e2e0c060a232ce714
parent192b45e0e4180326b1312ae8bdabf477d086c400
x86/p2m: suppress audit_p2m hook when possible

When P2M_AUDIT is false, it's unused, so instead of having a dangling
NULL pointer sit there, omit the field altogether.

Instead of adding "#if P2M_AUDIT && defined(CONFIG_HVM)" in even more
places, fold the latter part right into the definition of P2M_AUDIT.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/domctl.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/p2m.h