On 1/5/07, Jimi Xenidis <jim...@watson.ibm.com> wrote:
IMNSHO the fact that these structures require PACKED is a clear indication
that the dizzying array of macro-itis in include/xen/elfcore.h and friends
has issues.
crash_notes in xen/common/kexec.c needs to be PACKED because existing
tools expect the notes to be aligned in a certain way. Regardless if
your architecture supports unaligned accesses or not. This
32-bit-elf-note-alignment-on-64-bit-platforms doesn't make sense at
all, but we need to follow the already adapted format or things won't
work.
See this thread for more information:
http://lkml.org/lkml/2006/11/2/69
The current kexec-for-dom0 implementation works for i386 and x86_64,
but it is likely broken for architectures that doesn't support
unaligned accesses. The right solution IMO is to keep crash_notes
PACKED but do all accesses through a local copy of the structure and
then update crash_notes through a memcpy().
/ magnus