ia64/xen-unstable

changeset 15797:b485d8d7347a

ioemu: Avoid unaligned guest memory accesses on ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Aug 29 15:47:55 2007 +0100 (2007-08-29)
parents 2eb38cefdcd9
children c398dad9d50a
files tools/ioemu/target-i386-dm/exec-dm.c
line diff
     1.1 --- a/tools/ioemu/target-i386-dm/exec-dm.c	Wed Aug 29 15:43:53 2007 +0100
     1.2 +++ b/tools/ioemu/target-i386-dm/exec-dm.c	Wed Aug 29 15:47:55 2007 +0100
     1.3 @@ -470,6 +470,12 @@ static void memcpy_words(void *dst, void
     1.4  #else
     1.5  static void memcpy_words(void *dst, void *src, size_t n)
     1.6  {
     1.7 +    /* Some architectures do not like unaligned accesses. */
     1.8 +    if (((unsigned long)dst | (unsigned long)src) & 3) {
     1.9 +        memcpy(dst, src, n);
    1.10 +        return;
    1.11 +    }
    1.12 +
    1.13      while (n >= sizeof(uint32_t)) {
    1.14          *((uint32_t *)dst) = *((uint32_t *)src);
    1.15          dst = ((uint32_t *)dst) + 1;