# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1188384201 -32400
# Node ID ab3a6dbca87306bd74c691575226d9071d786c07
# Parent 97c0b1a793162f39251183672b7b057386772aa8
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.
PATCHNAME: introduce_xc_core_arch_gpfn_may_present
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core.c Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core.h
--- a/tools/libxc/xc_core.h Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core.h Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_ia64.c
--- a/tools/libxc/xc_core_ia64.c Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_ia64.c Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_ia64.h
--- a/tools/libxc/xc_core_ia64.h Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_ia64.h Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_powerpc.c
--- a/tools/libxc/xc_core_powerpc.c Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_powerpc.c Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_powerpc.h
--- a/tools/libxc/xc_core_powerpc.h Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_powerpc.h Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_x86.c
--- a/tools/libxc/xc_core_x86.c Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_x86.c Wed Aug 29 19:43:21 2007 +0900
@@ -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 97c0b1a79316 -r ab3a6dbca873 tools/libxc/xc_core_x86.h
--- a/tools/libxc/xc_core_x86.h Wed Aug 29 19:02:16 2007 +0900
+++ b/tools/libxc/xc_core_x86.h Wed Aug 29 19:43:21 2007 +0900
@@ -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,
15765_ab3a6dbca873_introduce_xc_core_arch_gpfn_may_present.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|