GUEST_PTE_SIZE are only used by multi.c, but private.h gets used by code that doesn't have GUEST_PAGING_LEVELS defined. Eclair notes that this is a violation of MISRA Rule 20.9.
Move it into types.h with the rest of the level-dependent logic lives. No functional change. Signed-off-by: Andrew Cooper <[email protected]> --- CC: Jan Beulich <[email protected]> CC: Roger Pau Monné <[email protected]> CC: Stefano Stabellini <[email protected]> CC: [email protected] <[email protected]> CC: Nicola Vetrini <[email protected]> --- xen/arch/x86/mm/shadow/private.h | 7 ------- xen/arch/x86/mm/shadow/types.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h index 1ef908a380de..bc99e00100f7 100644 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -121,13 +121,6 @@ enum { }; -/* Size (in bytes) of a guest PTE */ -#if GUEST_PAGING_LEVELS >= 3 -# define GUEST_PTE_SIZE 8 -#else -# define GUEST_PTE_SIZE 4 -#endif - /****************************************************************************** * Auditing routines */ diff --git a/xen/arch/x86/mm/shadow/types.h b/xen/arch/x86/mm/shadow/types.h index d700d8d64c8a..13d13c52c007 100644 --- a/xen/arch/x86/mm/shadow/types.h +++ b/xen/arch/x86/mm/shadow/types.h @@ -18,6 +18,13 @@ #define SHADOW_PAGING_LEVELS 3 #endif +/* Size (in bytes) of a guest PTE */ +#if GUEST_PAGING_LEVELS >= 3 +# define GUEST_PTE_SIZE 8 +#else +# define GUEST_PTE_SIZE 4 +#endif + /* * Define various types for handling pagetabels, based on these options: * SHADOW_PAGING_LEVELS : Number of levels of shadow pagetables -- 2.39.5
