[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Introduce xc_core_arch_gpfn_may_present() hook.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188482421 -3600
# Node ID 263fc122f62b62e079d1da547c64a52cdba24419
# Parent  df860912f348dce37ed4d42702d9dfe3f71b9b20
Introduce xc_core_arch_gpfn_may_present() hook.
On ia64 trying to map a foreign domain page which isn't allocated
cause annoying warning message. xm dump-core results in too many
warnings. With this hook, ia64 dump-core can suprress warning.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/xc_core.c         |    8 ++++++--
 tools/libxc/xc_core.h         |    6 ++++--
 tools/libxc/xc_core_ia64.c    |    4 ++--
 tools/libxc/xc_core_ia64.h    |    1 +
 tools/libxc/xc_core_powerpc.c |    4 ++--
 tools/libxc/xc_core_powerpc.h |    1 +
 tools/libxc/xc_core_x86.c     |    4 ++--
 tools/libxc/xc_core_x86.h     |    1 +
 8 files changed, 19 insertions(+), 10 deletions(-)

diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core.c     Thu Aug 30 15:00:21 2007 +0100
@@ -474,8 +474,9 @@ xc_domain_dumpcore_via_callback(int xc_h
     }
 
     /* obtain memory map */
-    sts = xc_core_arch_memory_map_get(xc_handle, &info, live_shinfo,
-                                      &memory_map, &nr_memory_map);
+    sts = xc_core_arch_memory_map_get(xc_handle, &arch_ctxt, &info,
+                                      live_shinfo, &memory_map,
+                                      &nr_memory_map);
     if ( sts != 0 )
         goto out;
 
@@ -756,6 +757,9 @@ xc_domain_dumpcore_via_callback(int xc_h
             }
             else
             {
+                if ( !xc_core_arch_gpfn_may_present(&arch_ctxt, i) )
+                    continue;
+
                 gmfn = i;
                 pfn_array[j] = i;
             }
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core.h
--- a/tools/libxc/xc_core.h     Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core.h     Thu Aug 30 15:00:21 2007 +0100
@@ -133,8 +133,10 @@ struct xc_core_memory_map {
 };
 typedef struct xc_core_memory_map xc_core_memory_map_t;
 int xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info);
-int xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info,
-                                shared_info_t *live_shinfo,
+struct xc_core_arch_context;
+int xc_core_arch_memory_map_get(int xc_handle,
+                                struct xc_core_arch_context *arch_ctxt,
+                                xc_dominfo_t *info, shared_info_t *live_shinfo,
                                 xc_core_memory_map_t **mapp,
                                 unsigned int *nr_entries);
 int xc_core_arch_map_p2m(int xc_handle, xc_dominfo_t *info,
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_ia64.c
--- a/tools/libxc/xc_core_ia64.c        Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_ia64.c        Thu Aug 30 15:00:21 2007 +0100
@@ -158,8 +158,8 @@ memory_map_get_old(int xc_handle, xc_dom
 }
 
 int
-xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info,
-                            shared_info_t *live_shinfo,
+xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused,
+                            xc_dominfo_t *info, shared_info_t *live_shinfo,
                             xc_core_memory_map_t **mapp,
                             unsigned int *nr_entries)
 {
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_ia64.h
--- a/tools/libxc/xc_core_ia64.h        Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_ia64.h        Thu Aug 30 15:00:21 2007 +0100
@@ -46,6 +46,7 @@ int
 int
 xc_core_arch_context_dump(struct xc_core_arch_context* arch_ctxt,
                           void* args, dumpcore_rtn_t dump_rtn);
+#define xc_core_arch_gpfn_may_present(arch_ctxt, i)             (1)
 
 #endif /* XC_CORE_IA64_H */
 
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_powerpc.c
--- a/tools/libxc/xc_core_powerpc.c     Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_powerpc.c     Thu Aug 30 15:00:21 2007 +0100
@@ -43,8 +43,8 @@ xc_core_arch_map_p2m(int xc_handle, xc_d
 }
 
 int
-xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info,
-                            shared_info_t *live_shinfo,
+xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused,
+                            xc_dominfo_t *info, shared_info_t *live_shinfo,
                             xc_core_memory_map_t **mapp,
                             unsigned int *nr_entries)
 {
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_powerpc.h
--- a/tools/libxc/xc_core_powerpc.h     Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_powerpc.h     Thu Aug 30 15:00:21 2007 +0100
@@ -33,6 +33,7 @@ struct xc_core_arch_context {
 #define xc_core_arch_context_get(arch_ctxt, ctxt, xc_handle, domid) \
                                                                 (0)
 #define xc_core_arch_context_dump(arch_ctxt, args, dump_rtn)    (0)
+#define xc_core_arch_gpfn_may_present(arch_ctxt, i)             (1)
 
 static inline int
 xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt, 
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_x86.c
--- a/tools/libxc/xc_core_x86.c Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_x86.c Thu Aug 30 15:00:21 2007 +0100
@@ -33,8 +33,8 @@ xc_core_arch_auto_translated_physmap(con
 }
 
 int
-xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info,
-                            shared_info_t *live_shinfo,
+xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused,
+                            xc_dominfo_t *info, shared_info_t *live_shinfo,
                             xc_core_memory_map_t **mapp,
                             unsigned int *nr_entries)
 {
diff -r df860912f348 -r 263fc122f62b tools/libxc/xc_core_x86.h
--- a/tools/libxc/xc_core_x86.h Thu Aug 30 14:58:40 2007 +0100
+++ b/tools/libxc/xc_core_x86.h Thu Aug 30 15:00:21 2007 +0100
@@ -40,6 +40,7 @@ struct xc_core_arch_context {
 #define xc_core_arch_context_get(arch_ctxt, ctxt, xc_handle, domid) \
                                                                 (0)
 #define xc_core_arch_context_dump(arch_ctxt, args, dump_rtn)    (0)
+#define xc_core_arch_gpfn_may_present(arch_ctxt, i)             (1)
 
 static inline int
 xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt, 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.