3 messages in com.xensource.lists.xen-develRe: [Fwd: Re: [Xen-devel] [ANNOUNCE] ...
FromSent OnAttachments
Jimi Xenidis04 Jan 2007 09:51 
Keir Fraser04 Jan 2007 09:57 
Magnus Damm04 Jan 2007 18:58 
Subject:Re: [Fwd: Re: [Xen-devel] [ANNOUNCE] Xen 3.0.4 release candidate 2]
From:Magnus Damm (magn@gmail.com)
Date:01/04/2007 06:58:10 PM
List:com.xensource.lists.xen-devel

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