ia64/xen-unstable

changeset 16410:ae6f4c7f15cb

hvm: Do not crash guest if it does an unaligned access to an HPET
register. Some CrashMe test apaprently does this and we don't want
that to crash the domain it runs in.
From: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Nov 21 09:49:09 2007 +0000 (2007-11-21)
parents 00fec8212ae6
children ec0bc82cebfd
files xen/arch/x86/hvm/hpet.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hpet.c	Wed Nov 21 09:45:22 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hpet.c	Wed Nov 21 09:49:09 2007 +0000
     1.3 @@ -127,9 +127,13 @@ static inline int hpet_check_access_leng
     1.4  {
     1.5      if ( (addr & (len - 1)) || (len > 8) )
     1.6      {
     1.7 -        gdprintk(XENLOG_ERR, "HPET: access across register boundary: "
     1.8 +        /*
     1.9 +         * According to ICH9 specification, unaligned accesses may result
    1.10 +         * in unexpected behaviour or master abort, but should not crash/hang.
    1.11 +         * Hence we read all-ones, drop writes, and log a warning.
    1.12 +         */
    1.13 +        gdprintk(XENLOG_WARNING, "HPET: access across register boundary: "
    1.14                   "%lx %lx\n", addr, len);
    1.15 -        domain_crash(current->domain);
    1.16          return -EINVAL;
    1.17      }
    1.18