WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Move some definitions from xg_save_resotr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Move some definitions from xg_save_resotre.h to xg_private.h
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 03:50:21 -0800
Delivery-date: Mon, 26 Feb 2007 04:21:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1172326782 0
# Node ID f61992cb82fe6022728977ee87afd65554afdaff
# Parent  aa1be6f5150e609585d1d404c364b76de95a632b
Move some definitions from xg_save_resotre.h to xg_private.h
which are necessary for the new dump core implementation.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/xc_linux_restore.c |    1 +
 tools/libxc/xc_linux_save.c    |    1 +
 tools/libxc/xg_private.h       |   17 +++++++++++++++++
 tools/libxc/xg_save_restore.h  |   21 ---------------------
 4 files changed, 19 insertions(+), 21 deletions(-)

diff -r aa1be6f5150e -r f61992cb82fe tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Sat Feb 24 14:19:05 2007 +0000
+++ b/tools/libxc/xc_linux_restore.c    Sat Feb 24 14:19:42 2007 +0000
@@ -11,6 +11,7 @@
 
 #include "xg_private.h"
 #include "xg_save_restore.h"
+#include "xc_dom.h"
 
 /* max mfn of the current host machine */
 static unsigned long max_mfn;
diff -r aa1be6f5150e -r f61992cb82fe tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Sat Feb 24 14:19:05 2007 +0000
+++ b/tools/libxc/xc_linux_save.c       Sat Feb 24 14:19:42 2007 +0000
@@ -13,6 +13,7 @@
 #include <sys/time.h>
 
 #include "xc_private.h"
+#include "xc_dom.h"
 #include "xg_private.h"
 #include "xg_save_restore.h"
 
diff -r aa1be6f5150e -r f61992cb82fe tools/libxc/xg_private.h
--- a/tools/libxc/xg_private.h  Sat Feb 24 14:19:05 2007 +0000
+++ b/tools/libxc/xg_private.h  Sat Feb 24 14:19:42 2007 +0000
@@ -146,6 +146,23 @@ typedef l4_pgentry_64_t l4_pgentry_t;
 #define PAGE_SIZE_IA64          (1UL << PAGE_SHIFT_IA64)
 #define PAGE_MASK_IA64          (~(PAGE_SIZE_IA64-1))
 
+#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
+
+/* Size in bytes of the P2M (rounded up to the nearest PAGE_SIZE bytes) */
+#define P2M_SIZE        ROUNDUP((max_pfn * sizeof(xen_pfn_t)), PAGE_SHIFT)
+
+/* Number of xen_pfn_t in a page */
+#define fpp             (PAGE_SIZE/sizeof(xen_pfn_t))
+
+/* Number of entries in the pfn_to_mfn_frame_list_list */
+#define P2M_FLL_ENTRIES (((max_pfn)+(fpp*fpp)-1)/(fpp*fpp))
+
+/* Number of entries in the pfn_to_mfn_frame_list */
+#define P2M_FL_ENTRIES  (((max_pfn)+fpp-1)/fpp)
+
+/* Size in bytes of the pfn_to_mfn_frame_list     */
+#define P2M_FL_SIZE     ((P2M_FL_ENTRIES)*sizeof(unsigned long))
+
 #define PAEKERN_no           0
 #define PAEKERN_yes          1
 #define PAEKERN_extended_cr3 2
diff -r aa1be6f5150e -r f61992cb82fe tools/libxc/xg_save_restore.h
--- a/tools/libxc/xg_save_restore.h     Sat Feb 24 14:19:05 2007 +0000
+++ b/tools/libxc/xg_save_restore.h     Sat Feb 24 14:19:42 2007 +0000
@@ -81,7 +81,6 @@ static inline int get_platform_info(int 
 */
 
 #define PFN_TO_KB(_pfn) ((_pfn) << (PAGE_SHIFT - 10))
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 
 
 /*
@@ -94,25 +93,5 @@ static inline int get_platform_info(int 
 #define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
 #define M2P_CHUNKS(_m)  (M2P_SIZE((_m)) >> M2P_SHIFT)
 
-/* Size in bytes of the P2M (rounded up to the nearest PAGE_SIZE bytes) */
-#define P2M_SIZE        ROUNDUP((max_pfn * sizeof(xen_pfn_t)), PAGE_SHIFT)
-
-/* Number of xen_pfn_t in a page */
-#define fpp             (PAGE_SIZE/sizeof(xen_pfn_t))
-
-/* Number of entries in the pfn_to_mfn_frame_list */
-#define P2M_FL_ENTRIES  (((max_pfn)+fpp-1)/fpp)
-
-/* Size in bytes of the pfn_to_mfn_frame_list     */
-#define P2M_FL_SIZE     ((P2M_FL_ENTRIES)*sizeof(unsigned long))
-
-/* Number of entries in the pfn_to_mfn_frame_list_list */
-#define P2M_FLL_ENTRIES (((max_pfn)+(fpp*fpp)-1)/(fpp*fpp))
-
 /* Returns TRUE if the PFN is currently mapped */
 #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
-
-#define INVALID_P2M_ENTRY   (~0UL)
-
-
-

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Move some definitions from xg_save_resotre.h to xg_private.h, Xen patchbot-unstable <=