|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/libxenguest: move M2P macros to xg_private.h
commit edf5b22022aea0a76eaeb36cc060d984340e1e18
Author: Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Tue Jan 5 16:13:56 2021 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jan 5 17:11:43 2021 +0000
tools/libxenguest: move M2P macros to xg_private.h
Just code movement as a preparatory change before xg_sr_* will be moved.
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
tools/libs/guest/xg_private.h | 10 ++++++++++
tools/libs/guest/xg_save_restore.h | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/libs/guest/xg_private.h b/tools/libs/guest/xg_private.h
index fee3191cd4..c3ed8c1257 100644
--- a/tools/libs/guest/xg_private.h
+++ b/tools/libs/guest/xg_private.h
@@ -135,4 +135,14 @@ static inline xen_pfn_t xc_pfn_to_mfn(xen_pfn_t pfn,
xen_pfn_t *p2m,
int pin_table(xc_interface *xch, unsigned int type, unsigned long mfn,
uint32_t dom);
+/*
+ * The M2P is made up of some number of 'chunks' of at least 2MB in size.
+ * The below definitions and utility function(s) deal with mapping the M2P
+ * regarldess of the underlying machine memory size or architecture.
+ */
+#define M2P_SHIFT L2_PAGETABLE_SHIFT_PAE
+#define M2P_CHUNK_SIZE (1 << M2P_SHIFT)
+#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
+#define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT)
+
#endif /* XG_PRIVATE_H */
diff --git a/tools/libs/guest/xg_save_restore.h
b/tools/libs/guest/xg_save_restore.h
index a9c1a2dbe3..3dbbc8dcd2 100644
--- a/tools/libs/guest/xg_save_restore.h
+++ b/tools/libs/guest/xg_save_restore.h
@@ -39,16 +39,6 @@
#define PFN_TO_KB(_pfn) ((_pfn) << (PAGE_SHIFT - 10))
-/*
-** The M2P is made up of some number of 'chunks' of at least 2MB in size.
-** The below definitions and utility function(s) deal with mapping the M2P
-** regarldess of the underlying machine memory size or architecture.
-*/
-#define M2P_SHIFT L2_PAGETABLE_SHIFT_PAE
-#define M2P_CHUNK_SIZE (1 << M2P_SHIFT)
-#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
-#define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT)
-
#define MEMCPY_FIELD(_d, _s, _f, _w) do { \
if ((_w) == 8) \
memcpy(&(_d)->x64._f, &(_s)->x64._f,sizeof((_d)->x64._f)); \
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |