ia64/xen-unstable
changeset 15802:263fc122f62b
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@valinux.co.jp>
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@valinux.co.jp>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Aug 30 15:00:21 2007 +0100 (2007-08-30) |
parents | df860912f348 |
children | 23bf79231e12 |
files | tools/libxc/xc_core.c tools/libxc/xc_core.h tools/libxc/xc_core_ia64.c tools/libxc/xc_core_ia64.h tools/libxc/xc_core_powerpc.c tools/libxc/xc_core_powerpc.h tools/libxc/xc_core_x86.c tools/libxc/xc_core_x86.h |
line diff
1.1 --- a/tools/libxc/xc_core.c Thu Aug 30 14:58:40 2007 +0100 1.2 +++ b/tools/libxc/xc_core.c Thu Aug 30 15:00:21 2007 +0100 1.3 @@ -474,8 +474,9 @@ xc_domain_dumpcore_via_callback(int xc_h 1.4 } 1.5 1.6 /* obtain memory map */ 1.7 - sts = xc_core_arch_memory_map_get(xc_handle, &info, live_shinfo, 1.8 - &memory_map, &nr_memory_map); 1.9 + sts = xc_core_arch_memory_map_get(xc_handle, &arch_ctxt, &info, 1.10 + live_shinfo, &memory_map, 1.11 + &nr_memory_map); 1.12 if ( sts != 0 ) 1.13 goto out; 1.14 1.15 @@ -756,6 +757,9 @@ xc_domain_dumpcore_via_callback(int xc_h 1.16 } 1.17 else 1.18 { 1.19 + if ( !xc_core_arch_gpfn_may_present(&arch_ctxt, i) ) 1.20 + continue; 1.21 + 1.22 gmfn = i; 1.23 pfn_array[j] = i; 1.24 }
2.1 --- a/tools/libxc/xc_core.h Thu Aug 30 14:58:40 2007 +0100 2.2 +++ b/tools/libxc/xc_core.h Thu Aug 30 15:00:21 2007 +0100 2.3 @@ -133,8 +133,10 @@ struct xc_core_memory_map { 2.4 }; 2.5 typedef struct xc_core_memory_map xc_core_memory_map_t; 2.6 int xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info); 2.7 -int xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info, 2.8 - shared_info_t *live_shinfo, 2.9 +struct xc_core_arch_context; 2.10 +int xc_core_arch_memory_map_get(int xc_handle, 2.11 + struct xc_core_arch_context *arch_ctxt, 2.12 + xc_dominfo_t *info, shared_info_t *live_shinfo, 2.13 xc_core_memory_map_t **mapp, 2.14 unsigned int *nr_entries); 2.15 int xc_core_arch_map_p2m(int xc_handle, xc_dominfo_t *info,
3.1 --- a/tools/libxc/xc_core_ia64.c Thu Aug 30 14:58:40 2007 +0100 3.2 +++ b/tools/libxc/xc_core_ia64.c Thu Aug 30 15:00:21 2007 +0100 3.3 @@ -158,8 +158,8 @@ memory_map_get_old(int xc_handle, xc_dom 3.4 } 3.5 3.6 int 3.7 -xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info, 3.8 - shared_info_t *live_shinfo, 3.9 +xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused, 3.10 + xc_dominfo_t *info, shared_info_t *live_shinfo, 3.11 xc_core_memory_map_t **mapp, 3.12 unsigned int *nr_entries) 3.13 {
4.1 --- a/tools/libxc/xc_core_ia64.h Thu Aug 30 14:58:40 2007 +0100 4.2 +++ b/tools/libxc/xc_core_ia64.h Thu Aug 30 15:00:21 2007 +0100 4.3 @@ -46,6 +46,7 @@ xc_core_arch_context_get_shdr(struct xc_ 4.4 int 4.5 xc_core_arch_context_dump(struct xc_core_arch_context* arch_ctxt, 4.6 void* args, dumpcore_rtn_t dump_rtn); 4.7 +#define xc_core_arch_gpfn_may_present(arch_ctxt, i) (1) 4.8 4.9 #endif /* XC_CORE_IA64_H */ 4.10
5.1 --- a/tools/libxc/xc_core_powerpc.c Thu Aug 30 14:58:40 2007 +0100 5.2 +++ b/tools/libxc/xc_core_powerpc.c Thu Aug 30 15:00:21 2007 +0100 5.3 @@ -43,8 +43,8 @@ xc_core_arch_map_p2m(int xc_handle, xc_d 5.4 } 5.5 5.6 int 5.7 -xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info, 5.8 - shared_info_t *live_shinfo, 5.9 +xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused, 5.10 + xc_dominfo_t *info, shared_info_t *live_shinfo, 5.11 xc_core_memory_map_t **mapp, 5.12 unsigned int *nr_entries) 5.13 {
6.1 --- a/tools/libxc/xc_core_powerpc.h Thu Aug 30 14:58:40 2007 +0100 6.2 +++ b/tools/libxc/xc_core_powerpc.h Thu Aug 30 15:00:21 2007 +0100 6.3 @@ -33,6 +33,7 @@ struct xc_core_arch_context { 6.4 #define xc_core_arch_context_get(arch_ctxt, ctxt, xc_handle, domid) \ 6.5 (0) 6.6 #define xc_core_arch_context_dump(arch_ctxt, args, dump_rtn) (0) 6.7 +#define xc_core_arch_gpfn_may_present(arch_ctxt, i) (1) 6.8 6.9 static inline int 6.10 xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt,
7.1 --- a/tools/libxc/xc_core_x86.c Thu Aug 30 14:58:40 2007 +0100 7.2 +++ b/tools/libxc/xc_core_x86.c Thu Aug 30 15:00:21 2007 +0100 7.3 @@ -33,8 +33,8 @@ xc_core_arch_auto_translated_physmap(con 7.4 } 7.5 7.6 int 7.7 -xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info, 7.8 - shared_info_t *live_shinfo, 7.9 +xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused, 7.10 + xc_dominfo_t *info, shared_info_t *live_shinfo, 7.11 xc_core_memory_map_t **mapp, 7.12 unsigned int *nr_entries) 7.13 {
8.1 --- a/tools/libxc/xc_core_x86.h Thu Aug 30 14:58:40 2007 +0100 8.2 +++ b/tools/libxc/xc_core_x86.h Thu Aug 30 15:00:21 2007 +0100 8.3 @@ -40,6 +40,7 @@ struct xc_core_arch_context { 8.4 #define xc_core_arch_context_get(arch_ctxt, ctxt, xc_handle, domid) \ 8.5 (0) 8.6 #define xc_core_arch_context_dump(arch_ctxt, args, dump_rtn) (0) 8.7 +#define xc_core_arch_gpfn_may_present(arch_ctxt, i) (1) 8.8 8.9 static inline int 8.10 xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt,