diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2007-11-21 09:49:09 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2007-11-21 09:49:09 +0000 |
commit | dddce819d11f8e137b51608559867f28d2b02299 (patch) | |
tree | f2ba0657cb00ee620653a242f18b79ebe3a66e5d /xen/arch/x86/hvm/hpet.c | |
parent | 6841190c2485d43b97a0048a690bba3676c680d5 (diff) | |
download | xen-dddce819d11f8e137b51608559867f28d2b02299.tar.gz xen-dddce819d11f8e137b51608559867f28d2b02299.tar.bz2 xen-dddce819d11f8e137b51608559867f28d2b02299.zip |
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>
Diffstat (limited to 'xen/arch/x86/hvm/hpet.c')
-rw-r--r-- | xen/arch/x86/hvm/hpet.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c index 5954955809..ee7d91f652 100644 --- a/xen/arch/x86/hvm/hpet.c +++ b/xen/arch/x86/hvm/hpet.c @@ -127,9 +127,13 @@ static inline int hpet_check_access_length( { if ( (addr & (len - 1)) || (len > 8) ) { - gdprintk(XENLOG_ERR, "HPET: access across register boundary: " + /* + * According to ICH9 specification, unaligned accesses may result + * in unexpected behaviour or master abort, but should not crash/hang. + * Hence we read all-ones, drop writes, and log a warning. + */ + gdprintk(XENLOG_WARNING, "HPET: access across register boundary: " "%lx %lx\n", addr, len); - domain_crash(current->domain); return -EINVAL; } |