diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-01-15 12:37:42 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-01-15 12:37:42 +0000 |
commit | 3967bb3aff365793c04013fb2e29d7d79b44c5d3 (patch) | |
tree | f83174db75f446c8123fe805eb68f559cc50bfd5 /tools/libxc/xc_core_x86.h | |
parent | 523540cc9bc3c4c982fd2c5b9d65a96b2c210a36 (diff) | |
download | xen-3967bb3aff365793c04013fb2e29d7d79b44c5d3.tar.gz xen-3967bb3aff365793c04013fb2e29d7d79b44c5d3.tar.bz2 xen-3967bb3aff365793c04013fb2e29d7d79b44c5d3.zip |
libxc: Support cross-bitness guest when core-dumping
This patch allows core-dumping to work on a cross-bit host/guest
configuration, whereas previously that was not supported. It supports
both PV and FV guests. The core file format generated by the host,
needs to match that of the guest, so an alignment issue is addressed,
along with the p2m frame list handling being done according to the
guest size.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Diffstat (limited to 'tools/libxc/xc_core_x86.h')
-rw-r--r-- | tools/libxc/xc_core_x86.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/libxc/xc_core_x86.h b/tools/libxc/xc_core_x86.h index 6e3490bb27..739d90ef29 100644 --- a/tools/libxc/xc_core_x86.h +++ b/tools/libxc/xc_core_x86.h @@ -21,15 +21,8 @@ #ifndef XC_CORE_X86_H #define XC_CORE_X86_H -#if defined(__i386__) || defined(__x86_64__) #define ELF_ARCH_DATA ELFDATA2LSB -#if defined (__i386__) -# define ELF_ARCH_MACHINE EM_386 -#else -# define ELF_ARCH_MACHINE EM_X86_64 -#endif -#endif /* __i386__ or __x86_64__ */ - +#define ELF_ARCH_MACHINE (guest_width == 8 ? EM_X86_64 : EM_386) struct xc_core_arch_context { /* nothing */ @@ -40,8 +33,10 @@ 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) +int +xc_core_arch_gpfn_may_present(struct xc_core_arch_context *arch_ctxt, + unsigned long pfn); static inline int xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt, struct xc_core_section_headers *sheaders, |