From 88b13cffbe202bf5e0ce5fc5ed91b689de79970c Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 22 May 2013 23:09:38 +0400 Subject: [PATCH] mem: Add PME_ bits for page frame retrieval Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- include/mem.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/mem.h b/include/mem.h index 37125f9b5..6cfd2e30f 100644 --- a/include/mem.h +++ b/include/mem.h @@ -15,5 +15,11 @@ extern int parasite_dump_pages_seized(struct parasite_ctl *ctl, #define PME_SWAP (1ULL << 62) #define PME_FILE (1ULL << 61) #define PME_SOFT_DIRTY (1ULL << 55) +#define PME_PSHIFT_BITS (6) +#define PME_STATUS_BITS (3) +#define PME_STATUS_OFFSET (64 - PME_STATUS_BITS) +#define PME_PSHIFT_OFFSET (PME_STATUS_OFFSET - PME_PSHIFT_BITS) +#define PME_PFRAME_MASK ((1ULL << PME_PSHIFT_OFFSET) - 1) +#define PME_PFRAME(x) ((x) & PME_PFRAME_MASK) #endif /* __CR_MEM_H__ */