[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/paging: Make paging_mode_*() predecates behave like predicates
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Tim Deegan <tim@xxxxxxx> CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx> --- xen/include/asm-x86/paging.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h index a1401ab..56eef6b 100644 --- a/xen/include/asm-x86/paging.h +++ b/xen/include/asm-x86/paging.h @@ -57,14 +57,14 @@ * requires VT or similar mechanisms */ #define PG_external (XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL << PG_mode_shift) -#define paging_mode_enabled(_d) ((_d)->arch.paging.mode) -#define paging_mode_shadow(_d) ((_d)->arch.paging.mode & PG_SH_enable) -#define paging_mode_hap(_d) ((_d)->arch.paging.mode & PG_HAP_enable) - -#define paging_mode_refcounts(_d) ((_d)->arch.paging.mode & PG_refcounts) -#define paging_mode_log_dirty(_d) ((_d)->arch.paging.mode & PG_log_dirty) -#define paging_mode_translate(_d) ((_d)->arch.paging.mode & PG_translate) -#define paging_mode_external(_d) ((_d)->arch.paging.mode & PG_external) +#define paging_mode_enabled(_d) (!!(_d)->arch.paging.mode) +#define paging_mode_shadow(_d) (!!((_d)->arch.paging.mode & PG_SH_enable)) +#define paging_mode_hap(_d) (!!((_d)->arch.paging.mode & PG_HAP_enable)) + +#define paging_mode_refcounts(_d) (!!((_d)->arch.paging.mode & PG_refcounts)) +#define paging_mode_log_dirty(_d) (!!((_d)->arch.paging.mode & PG_log_dirty)) +#define paging_mode_translate(_d) (!!((_d)->arch.paging.mode & PG_translate)) +#define paging_mode_external(_d) (!!((_d)->arch.paging.mode & PG_external)) /* flags used for paging debug */ #define PAGING_DEBUG_LOGDIRTY 0 -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |