[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] ioemu: Avoid unaligned guest memory accesses on ia64.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1188398875 -3600 # Node ID b485d8d7347ae33492490d1aca4b404af89b53e2 # Parent 2eb38cefdcd934d7f1142f1ca4f29e118ca04926 ioemu: Avoid unaligned guest memory accesses on ia64. Signed-off-by: Alex Williamson <alex.williamson@xxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/ioemu/target-i386-dm/exec-dm.c | 6 ++++++ 1 files changed, 6 insertions(+) diff -r 2eb38cefdcd9 -r b485d8d7347a tools/ioemu/target-i386-dm/exec-dm.c --- a/tools/ioemu/target-i386-dm/exec-dm.c Wed Aug 29 15:43:53 2007 +0100 +++ b/tools/ioemu/target-i386-dm/exec-dm.c Wed Aug 29 15:47:55 2007 +0100 @@ -470,6 +470,12 @@ static void memcpy_words(void *dst, void #else static void memcpy_words(void *dst, void *src, size_t n) { + /* Some architectures do not like unaligned accesses. */ + if (((unsigned long)dst | (unsigned long)src) & 3) { + memcpy(dst, src, n); + return; + } + while (n >= sizeof(uint32_t)) { *((uint32_t *)dst) = *((uint32_t *)src); dst = ((uint32_t *)dst) + 1; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |