relocate p2m_access_t into common and swap the order
authorTamas K Lengyel <tklengyel@sec.in.tum.de>
Fri, 26 Sep 2014 14:24:02 +0000 (16:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Sep 2014 14:24:02 +0000 (16:24 +0200)
commit4c63692d7c38c5ac414fe97f8ef37b66e05abe5c
treef9c84f8cd1e3d5ba263ae416e5d111f21addfff8
parent86d9b0868a8dc7e5fde2cc1f584ed7dbc8d2d91a
relocate p2m_access_t into common and swap the order

We swap the order of the enum of types n ... rwx, as to have rwx at 0, which is
the default setting when mem_access is not in use. This has performance benefits for
non-memaccess paths, as now comparison is to 0 when checking if memaccess is in use,
which is often faster.

We fix one location in nested_hap where the order of the enum made a difference.

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/hap/nested_hap.c
xen/include/asm-x86/p2m.h
xen/include/xen/p2m-common.h